Skip to content

A Twitter/X.com bot which searches and reposts new posts using a hashtag, ignoring blocked and muted accounts and with customizable filters.

License

Notifications You must be signed in to change notification settings

bobdaduck/Simple-Retweet-Bot-plus-blockignore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Modification of Twitter Retweet Bot using Python & Tweepy. Searches and retweets based on hashtag or keyword. Checks for blocked or muted accounts and words to avoid retweeting spam or malicious actors. Intelligently splits content it is not sure about into a printout for manual verification.

What You Need && Need to Know

  • Tweepy - An easy-to-use Python library for accessing the Twitter API.

pip install tweepy

Instructions

  • Out of general OS hygiene, create a new directory to contain all of your retweet bot files.

mkdir retweet-bot

  • Create a new Twitter Application. This is where you'll generate your keys, tokens, and secrets.
  • Fill in your keys, tokens, and secrets in the keys.py file.
  • Check comments in retweet.py to tweak the retweet bot to your liking.
  • The example demonstrates a single hashtag value, but you can tweak the code to search multiple hashtags. Example:

q='%23apples%20OR%20%23oranges' will search #apples OR #oranges

  • Run your retweet.py script. Enjoy!

python retweet.py

Additional Information

  • Note: Make sure that your retweet.py and keys.py files are, obviously, in the same directory.
  • Create a Cron Job or use Task Scheduler to automate this script.
  • Consider using a Raspberry Pi to host your retweet bot, so it's always on and always running. :)

About

A Twitter/X.com bot which searches and reposts new posts using a hashtag, ignoring blocked and muted accounts and with customizable filters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%