A Python script, scheduled to run periodically, which analyzes the latest contents of HTML pages, processes them and sends the obtained data to a Telegram channel.
- HTML Parsing;
- Logging;
- External API Consumption (Telegram Bots);
- Tasks scheduling;
- NoSQL database;
- Production and Development environments;
- Docker deployment;
- Configuration file.
pip install -r requirements.txt
python main.py
Copy the content of credentials_example.ini
to a new file credentials.ini
, fill in the fields as you wish and execute the following command:
curl -sSL https://raw.githubusercontent.com/bartolek153/bot-messenger/main/deploy.sh | sh
Docker and Git must be installed in the local machine!
- data/ - Data Access Layer, which stores
db.json
and contains a Singleton object, that communicates with the database. - logs/ - Set up log handlers, accordingly to the current environment. When running in production mode, keeps history of logs in
app.log
. - models/ - Contains the logic necessary to gather information/data. Each area of interest is placed under a different module.
- telegram_channels/ - communication endpoint between this script and Telegram.
- tests/ - performs unit tests (development purposes).
constants.py
- global constants accessible from anywhere in the code.environment.py
- sets Production or Development environments.helper.py
- general usage functionsmain.py
- start point of the program, for production environment.
-
Deploy:
- Github Workflows
-
New Features:
- Get
News
section
- Get
-
Code Improvement:
- Regular expressions
- Asynchronous flow