A simple Twitter bot and a webpage which allows users to save any desired tweet or thread for later use just by mentioning this bot. The saved tweet/thread can be viewed in the webpage after loggin in with twitter. Users can also download tweets from webpage as a text file. They will also receive a copy of direct message from the bot.
BFH/recbY0A1OBTpNxJ5c/2021
- This project uses tweepy which is a Python library for accessing the Twitter API.
- We use tweepy to get the mentions for our bot.
- And using that mention, the thread/tweet is saved to a string along with the user who mentioned the bot.
- The saved variables are pushed to an SQL database using sqlalchemy library.
- The bot also sends a DM to the user with the thread(You have to follow the bot for DM to work)
- The website uses flask.
- The website has a twitter login through which we get an userid of Twitter user.
- Then the website searches for the userid in database and displays the result which can be downloaded as a thread.
- click 7.1.2
- Flask 2.0.1
- Flask-Dance 5.0.0
- Flask-Login 0.5.0
- Flask-SQLAlchemy 2.5.1
- gunicorn 20.1.0
- itsdangerous 2.0.1
- Jinja2 3.0.1
- SQLAlchemy 1.4.15
- tweepy 3.10.0
- psycopg2-binary 2.8.6
- Clone the GitHub repository.
git clone https://github.com/save-tweet/thread-it.git
- Create a virtual environment and activate it using:
virtualenv venv
source venv/bin/activate
- Install the libraries mentioned in requirements using:
pip install -r requirements.txt
Create 2 terminal instances. On first one run:
python main.py
And on second instance run:
python wsgi.py