Socket
Book a DemoInstallSign in
Socket

levelnewsbot-bb8877

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

levelnewsbot-bb8877

A bot that scrapes tweets for the freshest independent and alternative news links.

2.1.2
unpublished
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

bb8877

bb8877 is a news bot that scrapes urls from tweets belonging to orgs in the LevelNews.org news feed directory.

The Twitter accounts that bb8877 scrapes can be overridden via options you pass in programmatically and bb8877 is completely configurable.

By default, bb8877 will only return scraped urls belonging to whitelisted domains. Console output includes all urls, whitelisted or not.

bb8877 Can be run from the command line in a Node.js/NPM environment or integrated into any Node.js/NPM project programmatically.

Install/Usage for Command Line

Clone directly from GitHub on your local machine:

$ git clone https://github.com/LevelNewsOrg/levelnewsbot-bb8877.git
$ cd levelnewsbot-bb8877
$ npm install
$ npm link

If all went well above, you should be able to simply call bb8877 from the command line anywhere in your system. Output is printed to console:

$ bb8877

Programmatic Usage with Node.js/NPM projects

At the package.json directory level for your project:

$ npm install levelnewsbot-bb8877 --save

Inside your program, call bb8877 with a callback as first argument:

const bb8877 = require('levelnewsbot-bb8877')
bb8877(function(err, posts) {
  if (!err) {
    console.log(posts)
  }
})

Options

For programmatic use in your Node.js projects, you can pass in an options object as a second argument when you call bb8877 that can override any of the properties in the config/index.js file. An example of this usage can be found in test/config.js. NOTE: if you pass in a custom options.accounts array, bb8877 will automatically set both config.domainWhitelist and config.domainToAccountMap properties to null.

const options = {
  bot: 'clickybot',
  accounts: ['clickhole'],
  tweetFreshness: -72,
  tweetsPerAccount: 10,
  // set to false or empty to return urls without filtering by white list:
  domainWhitelist: ['clickhole.com'],
  // used to determine boolean value of post.scraper.isSelfTweet property
  // aka: is the account tweeting a link back to its own web property:
  domainToAccountMap: { 'clickhole.com': { twitter: 'clickhole'}}
}
const bb8877 = require('levelnewsbot-bb8877')
bb8877(function(err, posts) {
  if (!err) {
    console.log(posts)
  }
}, options)

Feature Requests

If you have a feature request, open an issue in the GitHub repository.

FAQs

Package last updated on 05 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.