Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AlbertSuarez/covid19-bot
π€ Real-time Twitter bot notifying new confirmed Coronavirus cases
https://github.com/AlbertSuarez/covid19-bot
2019-ncov bot coronavirus covid-19 python twitter-bot
Last synced: 16 days ago
JSON representation
π€ Real-time Twitter bot notifying new confirmed Coronavirus cases
- Host: GitHub
- URL: https://github.com/AlbertSuarez/covid19-bot
- Owner: AlbertSuarez
- License: mit
- Created: 2020-03-03T08:40:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-03-26T18:59:42.000Z (over 4 years ago)
- Last Synced: 2024-07-31T20:49:48.596Z (3 months ago)
- Topics: 2019-ncov, bot, coronavirus, covid-19, python, twitter-bot
- Language: Python
- Homepage: https://twitter.com/coronavid19_bot
- Size: 57.6 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# CoVid-19 bot
[![HitCount](http://hits.dwyl.io/AlbertSuarez/covid19-bot.svg)](http://hits.dwyl.io/AlbertSuarez/covid19-bot)
[![GitHub stars](https://img.shields.io/github/stars/AlbertSuarez/covid19-bot.svg)](https://GitHub.com/AlbertSuarez/covid19-bot/stargazers/)
[![GitHub forks](https://img.shields.io/github/forks/AlbertSuarez/covid19-bot.svg)](https://GitHub.com/AlbertSuarez/covid19-bot/network/)
[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/AlbertSuarez/covid19-bot.svg)](https://github.com/AlbertSuarez/covid19-bot)
[![GitHub contributors](https://img.shields.io/github/contributors/AlbertSuarez/covid19-bot.svg)](https://GitHub.com/AlbertSuarez/covid19-bot/graphs/contributors/)
[![GitHub license](https://img.shields.io/github/license/AlbertSuarez/covid19-bot.svg)](https://github.com/AlbertSuarez/covid19-bot/blob/master/LICENSE)[Twitter account](https://twitter.com/coronavid19_bot) | [Devpost project](https://devpost.com/software/covid19-bot) | [Static repo website](https://asuarez.dev/covid19-bot/)
π€ 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](https://www.worldometers.info/coronavirus/).
## Python requirements
This project is using Python3.7. All these requirements have been specified in the `requirements.lock` file.
1. [Requests](https://2.python-requests.org/en/master/): used for retrieving the HTML content of a website.
2. [Dictdiffer](https://dictdiffer.readthedocs.io/en/latest/): used for checking data differences easier.
3. [APScheduler](https://apscheduler.readthedocs.io/en/stable/): used for scheduling jobs in a certain time.
4. [Twitter](https://python-twitter.readthedocs.io/en/latest/): used for posting tweets.
5. [BeautifulSoup](https://pypi.org/project/beautifulsoup4/): used for scraping an HTML content.
6. [Tor](https://2019.www.torproject.org/docs/debian.html.en): used for making requests anonymous using other IPs.
7. [Fake User-Agent](https://pypi.org/project/fake-useragent/): used for using random User-Agent's for every request.## Recommendations
Usage of [virtualenv](https://realpython.com/blog/python/python-virtual-environments-a-primer/) 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
```bash
pip3 install -r requirements.lock
```3. Set up [Twitter API](https://developer.twitter.com/) account creating the .env file. This file must have this structure (without the brackets):
```
TWITTER_CONSUMER_KEY={TWITTER_CONSUMER_KEY}
TWITTER_CONSUMER_SECRET={TWITTER_CONSUMER_SECRET}
TWITTER_ACCESS_TOKEN_KEY={TWITTER_ACCESS_TOKEN_KEY}
TWITTER_ACCESS_TOKEN_SECRET={TWITTER_ACCESS_TOKEN_SECRET}
```4. Run the script as a Docker container
```bash
docker-compose up -d --build
```## Authors
- [Albert SuΓ rez](https://github.com/AlbertSuarez)
## License
MIT Β© CoVid-19 bot