Building a twitter bot for displaying news snippets on mention. To use it just @GetNewsAbout with a topic and we'll reply back with a news article 😃
Python>=3.8.1
Heroku Account
(For hosting)
To avail all the necessary dependencies for the project
pip3 install -r requirements.txt
Register for a Twitter developer account. Follow the steps to set up your Bot account and get your API keys.
Register at News API and follow the steps to obtain necessary API keys.
Navigate to the settings tab in your app on Heroku, and then enter all your API keys in the Config Vars
option.
To test your bot locally, add all the API Keys to a file locally and then add it to .gitignore so as to not make it public.
Turns out Heroku doesn't like to just run scripts with workers, because it expects to see a web server. Follow this link to work around it.
You can fix this by creating a simple web server. server.py