/CompChemNewsBot

A Computational Chemistry News Twitter Bot which runs daily and posts one updated news in Twitter (using tweepy)

Primary LanguagePythonMIT LicenseMIT

CompChemNewsBot

twitter bot tweepy twitter bot tweepy


πŸ”Έ requirements.txt πŸ“Œ

  • tweepy
  • feedparser
  • bs4

πŸ”Έ Get_Sub_News.py πŸ’» πŸ“°

Used modules: πŸ“’

  • datetime
  • bs4 (BeautifulSoup)
  • tweepy
  • os
  • logging

Note: πŸ“

  1. bs4 (BeautifulSoup) module is used to get the latest news data from google news.
  2. tweepy module is used to post latest news in the twitter.
  3. The bot also follows back if someone retweets any post.
  4. Also it saves the log in data.txt file.
  5. It also keeps the previously done tweets in tweets.txt file and checks each runtime to make sure no duplicate post happens.

How to Use ❓❓❓

Follow These Simple Steps:

  • 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.

😊😊😊Contributors Are Welcome 😊😊😊

Step for Contribution:

  • Star and Fork this repo to your account
  • Create a New Branch and do Necessary Modification
  • Send a PR

Found a bug ❌❌❌

Don' t worry we are always here to help you. Create a issue HERE

Loved My Work 😍😍😍

You can help me by contributing here πŸ‘‰