scrape-js

0.0.0 • Public • Published

scrape-js

An easy, robust, and straightforward web scraper with multifunctional uses.

Installation

npm install scrape-js

Example

The following code scrapes the Hacker News website and prints the first 30 titles found on the page.

var scrape = require('scrape-js')
scrape('news.ycombinator.com', ['.title a'], function (error, titles) {
    if(error) throw error;
    console.log('hacker news titles\n');
    titles.forEach(function (element, idx) {
        console.log('  %d. %s', idx+1, element.html());
    });
});

Readme

Keywords

Package Sidebar

Install

npm i scrape-js

Weekly Downloads

0

Version

0.0.0

License

MIT

Last publish

Collaborators

  • manan