Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    node-scrapperpublic

    node-scrapper

    Non-blocking node.js scrapper.
    Inspired by scrappy.

    Usage

    import {crawl} from 'node-scrapper';
     
    function* parse(browser, spider) {
        let source = yield browser.getText('#my-element');
        let pictureUrl = yield browser.getAttribute('#my-second-element', 'href');
        spider.get(pictureUrl, parsePicture);
    }
     
    function* parsePicture(browser, spider) {
        let imageUrl = yield browser.getAttribute('img.logo', 'src');
        saveToDB(imageUrl);
    }
     
    crawl(spider => {
        spider.get('http://example.com', parse);
    });
     

    Keywords

    none

    install

    npm i node-scrapper

    Downloadslast 7 days

    3

    version

    0.0.1

    license

    ISC

    repository

    github.com

    last publish

    collaborators

    • avatar