1.0.2 • Published 6 years ago

edel-adapters v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

edel-adapters

This is a collection of all kinds of adapters for some websites. Most of them are Chinese and none of them is H(sex-related).

This project is based on NodeJS and most of the adapters are based on cheerio to analyse the html string.

Terminal Command

  • edel-adapters -l : Show the current adapter list.
  • edel-adapters -u url : Use the internal dealer to handle the url.

API

const adapter = require('edel-adapters');

let url = 'https://example.com';

adapter.deal(url)
    .then(data => {
        console.log(`Got data from ${url} : ${data}`);
    })
    .catch(e => {
        console.log(`Fetching data from ${url} error!`);
    })

Todo list

  • -r recursive. To crawl a page recursively.