Skip to content

Just another simple scraper engine. made scraping easy

Notifications You must be signed in to change notification settings

nubuntu/nu-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nu-scraper

Another simple web scraping solution

How to install

npm install nu-scraper

create example.js

require('nu-scraper');

nu.scraper({
    port    :9090,
    dir     :__dirname + '/sites'
});
$ node example.js
scraper engine ready!
Listening on port 9090

and open your browser

http://localhost:9090/**controller**

example controller

http://localhost:9090/youtube

example : Youtube controller

exports.scraper = {
    url     : 'https://youtube.com/',
    rows    : function($){
        return $('.yt-shelf-grid-item');
    },
    fields  : {
        title : function($){
            return $('.yt-lockup-title').find('a').html();
        },
        link : function($){
            return this.source.url + $('.yt-lockup-title').find('a').attr('href');
        },
        thumbnail : function ($) {
            return $('.yt-thumb-simple').find('img').attr('src');
        }
    }
	
}

Author

About

Just another simple scraper engine. made scraping easy

Resources

Stars

Watchers

Forks

Packages

No packages published