Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.65 KB

README.md

File metadata and controls

53 lines (33 loc) · 1.65 KB

Retweet Bot

alt text

This script retweets certain tweets with a specific search query and can use parameters defined in the config file to perform additional actions. To limit Twitter requests it uses a savepoint for each configured query objects, search query id and marks the last tweet it retweeted.

It's Twitter API v1.1 ready.

Requirements:

You need Python 3.4 or later to run mypy. You can have multiple Python versions (2.x and 3.x) installed on the same system without problems.

To download Python 3.4 on Linux, OS X and Windows, packages are available at

http://www.python.org/getit/

Dependencies:

Install the dependencies like this:

pip install -r requirements.txt

Quick start:

To start create a copy of config.SAMPLE.json and rename to config.json, then follow the steps below.

If Python is installed correctly and your config.json file is setup, you can run the bot by using:

  • $ python retweet.py

Use as cron job

Create file at

/etc/cron.d/retweet-bot

With the contents

30 * * * * [your-user-here] cd ~/retweet-bot/src/ && python3 main.py >> ~/retweet-bot/twitter_bot.txt

Please use https://crontab.guru for more infomation on how to set intervals for cron jobs.

Compatibility

Compatible with Python 3.x, tested on Python 3.6.