- tweepy
- feedparser
- bs4
- datetime
- bs4 (BeautifulSoup)
- tweepy
- os
- logging
bs4 (BeautifulSoup)
module is used to get the latest news data from google news.tweepy
module is used to post latest news in the twitter.- The bot also follows back if someone retweets any post.
- Also it saves the log in data.txt file.
- It also keeps the previously done tweets in tweets.txt file and checks each runtime to make sure no duplicate post happens.
- Star and Fork this repo to your account
Create a Twitter Developer Account
- Apply for Twitter Developer Account here
- Fill all the necessities and create one Project Application
- Make the app permission to -
Read, Write, and Direct Messages
- Save the Consumer Key, Consumer Secret Key, Access Key and Access Token Secret in project folder under
.env file
as the following format -- Consumer_Key=XXXXXXXXXXXXXXXXX Consumer_Secret_Key=XXXXXXXXXXXXXXXXX Access_Token=XXXXXXXXXXXXXXXXX Access_Token_Secret=XXXXXXXXXXXXXXXXX
- Go to your project folder using your shell and run the following code to install all the required modules -
pip install -r requirements.txt
- Now you are good to go to run the bot using Heroku Schedular or WayScript Time trigger.
- Also you can use
while True
loop to run the bot forever.
- Star and Fork this repo to your account
- Create a New Branch and do Necessary Modification
- Send a PR
Don' t worry we are always here to help you. Create a issue HERE