A Javascript bot that searches recent tweets about contests (based on retweeting) and retweets them (+ likes, replies and follows if necessary). Inspired by http://www.hscott.net/twitter-contest-winning-as-a-service/
JavaScript
Latest commit 62900f0 Jan 6, 2017 @raulrene committed on GitHub Update README.md

README.md

Twitter contest JS bot

A Javascript bot that searches for tweets about contests and Retweets them. If necessary, it can also Like (Favorite) the tweet, Reply and Follow the user. It ignores tweets from blocked users.

Inspired by http://www.hscott.net/twitter-contest-winning-as-a-service/

Disclaimer

This bot is written purely for educational purposes. I hold no liability for what you do with this bot or what happens to you by using this bot. Abusing this bot can get you banned from Twitter, so make sure to read up on proper usage of the Twitter API.

Installation

  • Make sure you have NodeJS up and running
  • git clone the repository, or download the zip file and unzip it
  • npm install in the directory where you cloned the repository (this is needed for installing dependencies)

Usage

  • Edit the config.js file with your Twitter API Credentials
  • The configuration file also holds all configurations needed for the bot:
    • SEARCH_QUERIES - the searches the bot will do
    • SEARCH_QUERY_FILTERS - filters out data (each filter must be preceded by a "-")
    • SEARCH_BY_GEOCODE - allows searching by location given a latitude, longitude and radius
    • RESULT_TYPE - recent, popular or mixed
    • MIN_RETWEETS_NEEDED - minimum amount of retweets a tweet needs before we retweet it (significantly reduces the amount of fake contests)
    • MAX_USER_TWEETS - maximum amount of tweets a user can have before we do not retweet them
    • MAX_USER_TWEETS_BLOCK - block the user you suspect of being fake because of the high number of tweets
    • RATE_LIMIT_EXCEEDED_TIMEOUT - timeout when the max Twitter API limit is exceeded
    • RETWEET_TIMEOUT - timeout between retweets
    • RATE_SEARCH_TIMEOUT - timeout between searches
    • PREFERRED_ACCOUNTS - array of preferred accounts; if set, it only filters tweets from these accounts
  • To start, run node index.js

Dependencies

It makes use of request-promise - a HTTP JS client

Alternatives

If you're looking for similar projects in alternative languages, check these out:

Licence

The code is open-source and available under the MIT Licence. More details in the LICENCE.md file.