Ever wished about a bot which can save a twitter thread for you after having an interesting debate on twitter?🤔
Well, cuckoo can help you.😉
Mention her in the thread which you want to save, She will DM you the thread, OR,comeback and log in to the cuckoo console with your twitter id, you can simply download the thread. 😀
- Shine Santhosh | GitHub | Twitter
- JayaSurya Jayandan | GitHub | Twitter
- Aswin Anish | GitHub | Twitter
BFH/recyBx9eaZvAwGquP/2021
Cuckoo is not currently hosted anywhere
This repo holds the basic code for fetching threads and code to run the bot on repl.it. The web app/console is deployed uding flask and can be found at : Cuckoo Web console
- Tweepy - 3.10.0
- python-dotenv - 0.17.1
- replit - 3.1.0
Check requirements.txt for details
- Cuckoo is built using python and tweepy
- Install the required packages and run main.py
- Make sure you have twitter developer account
- Make sure to set the environment variables
- This bot uses replit db to keep track fo mentions. Make sure to create a key in replit db as described in How to run
- The main function checks for mentions every minute
- The thread_fetch function can be used to import mentions and threads to other python files
- thread_fetch also has a function writeThread, which can be called by passing in the twitter handle, it'll write the thread to a text file
- Install the requirements
- Set the environment variables
- Create a replit db item with key
last_id
and set value to 1 - Run main.py
- The bot uses the mentions timeline endpoint provided by the twitter API to fetch mentions
- The conversation id is retrieved from the mentions
- Using the conversation id the thread is fetched
- Then the thread is sent through DM
- The following environment variables must be set beforehand if you want to run cuckoo on your machine:
- API_KEY : Your twitter dev account api key
- API_SECRET: Your twitter dev account api secret
- BEARER_TOKEN: Your BearerToken
- ACCESS_TOKEN: Your app's access token
- ACCESS_TOKEN_SECRET: Your app's access token secret
- ID_OFFSET : Set a tweet id here, any mention before that will not be considered
Do you love this project? 😄
You think it has some bugs and know how to fix it? 😮
Or, you think this can be improved? 🤔
You're always welcome to fork, commit and send a pull request 😊
Any pull request, which helps to:
- Fix bugs
- Add more features
will be merged after reviews and conflict inspection from other contributors