Twitter-Bot is an automation bot using Tweepy Module with Python. This replaces the use of Twitter API as it is costly and takes much time to get access to. You can use it to post tweets, like tweets, and retweet and reply based on hashtags.
- Create a
python
virtual environment. - Clone the repo
git clone https://github.com/AdityaSeth777/Twitter_Bot.git
or download the repository. - Go to the cloned/downloaded directory
cd Twitter-Bot
- Run
pip3 install tweepy 3.7
- And now you can run the example scripts or create your own scripts.
- Apply for elevated access on Twitter playground.
- Extract the
Bearer Token and Access Token and Secret keys
created with Read, Write, and Direct Messages permissions. 8.Copy them and paste in the required portion of the code (authentication part)
- To like tweets on the homepage, run
python3 bot.py
- To like tweets based on keyword, run
python3 bot.py
- To post a tweet, run
python3 bot.py
- To retweet based on keyword, run
python3 bot.py
- How to stop the script? Ctrl+C (control+C for Mac)
- For any other problems, feel free to raise an issue.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Apache License 2.0 © Aditya Seth
I will be working on adding feature of finding and following new users. Apart from that I will also add features to perform other tasks on tweets such as sharing on other platforms or messaging someone.
💙 If you like this project, give it a ⭐ and share it with friends!
☕ Buy me a coffee
Made with ❤️ and Python