项目作者: AlbertSuarez

项目描述 :
🤖 Real-time Twitter bot notifying new confirmed Coronavirus cases
高级语言: Python
项目地址: git://github.com/AlbertSuarez/covid19-bot.git
创建时间: 2020-03-03T08:40:28Z
项目社区:https://github.com/AlbertSuarez/covid19-bot

开源协议:MIT License

下载


CoVid-19 bot

HitCount
GitHub stars
GitHub forks
GitHub repo size in bytes
GitHub contributors
GitHub license

Twitter account | Devpost project | Static repo website

🤖 Real time Twitter bot notifying new confirmed Corona virus (CoVid-19) cases, deaths and recovered people by location.

Data source

Real time data is being retrieved from the Worldometer website.

Python requirements

This project is using Python3.7. All these requirements have been specified in the requirements.lock file.

  1. Requests: used for retrieving the HTML content of a website.
  2. Dictdiffer: used for checking data differences easier.
  3. APScheduler: used for scheduling jobs in a certain time.
  4. Twitter: used for posting tweets.
  5. BeautifulSoup: used for scraping an HTML content.
  6. Tor: used for making requests anonymous using other IPs.
  7. Fake User-Agent: used for using random User-Agent’s for every request.

Recommendations

Usage of virtualenv is recommended for package library / runtime isolation.

Usage

To run this script, please execute the following from the root directory:

  1. Setup virtual environment

  2. Install dependencies

    1. pip3 install -r requirements.lock
  3. Set up Twitter API account creating the .env file. This file must have this structure (without the brackets):

    1. TWITTER_CONSUMER_KEY={TWITTER_CONSUMER_KEY}
    2. TWITTER_CONSUMER_SECRET={TWITTER_CONSUMER_SECRET}
    3. TWITTER_ACCESS_TOKEN_KEY={TWITTER_ACCESS_TOKEN_KEY}
    4. TWITTER_ACCESS_TOKEN_SECRET={TWITTER_ACCESS_TOKEN_SECRET}
  4. Run the script as a Docker container

    1. docker-compose up -d --build

Authors

License

MIT © CoVid-19 bot