4.1.0 • Published 3 years ago

vws-js-lib v4.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

VWS JS library

Node module for web-scraping on torrent video websites and search in some internet film databases

Mainly uses a module called cheerio by Matthew Mueller which implements a subset of jQuery specifically designed for server use.

Currently websites scraped list:

Implemented node modules for search on internet movie databases as:

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You'll need Node.js installed on your computer in order to build this library

$git clone https://github.com/rvillamil/vws-js-lib
$cd vws-js-lib
$npm install

Example use

Node module for crawl 2 video premieres in 'dontorrent' portal

var Show = require('vws-js-lib/lib/model/show');
var crawler = require('vws-js-lib/lib/dontorrent/crawler/showCrawler');

var onShowFoundEvent = function onShowDataCrawled(show) {
    console.log(`onShowDataCrawled - Show crawled !!  --> ${JSON.stringify(show)}\n\n`)
}

return crawler.crawlVideoPremieres(2, onShowDataCrawled)
    .then(showList => {
        console.log("crawler - crawlVideoPremieres length: " + showList.length);
    }).catch(function (err) {
        console.log('ERROR! crawlVideoPremieres: ' + err);
    });

Node module for search in OMDB

var omdb = require('vws-js-lib/lib/omdb');

return omdb.searchShow('Star wars', '1977')
    .then(show => {
        console.log('Show Star wars: ', show);
    })
    .catch(err => {
        console.log('Error: ' + err);
    });

Node module for earch in TMDB

var tmdb = require('vws-js-lib/lib/tmdb');

return tmdb.searchShow('Star wars', '1977')
    .then(show => {
        console.log('Show Star wars: ', show);
    })
    .catch(err => {
        console.log('Error: ' + err);
    });
  • More examples in 'test' directory

Running the tests

For running the automated tests for this system, with Mocha Javascript test framework

$npm test

or indiviual test by description

$npm test -- --grep "omdb"
$npm test -- --grep "crawler"

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.