the-crawler-twitter

1.0.3 • Public • Published

the-crawler-twitter

Build Status npm Version JS Standard

Crawler for twitter

Installation

$ npm install the-crawler-twitter --save

Usage

'use strict'
 
const theDB = require('the-db')
const { TheTwitterCrwl } = require('the-crawler-twitter')
 
async function tryExample () {
  const db = theDB({ /* ... */ })
 
  {
    class TweetResource extends theDB.Resource { /* ... */ }
    class TweetHtml extends theDB.Resource { /* ... */ }
    db.load(TweetResource, 'Tweet')
    db.load(TweetHtml, 'TweetHtml')
  }
  {
    let crwl = new TheTwitterCrwl({
      resources: {
        consumerKey: 'xxxxxxxxxxxxxxxxxxx',
        consumerSecret: 'xxxxxxxxxxxxxxxxxxx',
        accessTokenKey: 'xxxxxxxxxxxxxxxxxxx',
        accessTokenSecret: 'xxxxxxxxxxxxxxxxxxx',
        Resource: db.resources.Tweet,
        HtmlResource: db.resources.TweetHtml
      }
    })
    await crwl.run({})
  }
}
 
tryExample().catch((err) => console.error(err))
 

API Guide

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i the-crawler-twitter

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • okunishinishi