⛅ Telegram bot for showing weather
A pretty simple telegram bot for showing the weather on the territory of Russia.
The data is parsed with Yandex.Weather.
The interface is in Russian.
- Python 3.8.6
- pyTelegramBotAPI 3.8.2
- beautifulsoup4 4.9.3
- lxml 4.6.3
- requests 2.25.1
- psycopg2 2.9.1
- PostgreSQL
-
create a Telegram bot using @BotFather
- a description and text about the bot (commands /setdescription and /setabouttext)
- a profile photo (/setuserpic)
- enable the inline mode (/setinline)
- add command descriptions (/setcommands):
weather_now - погода сейчас
weather_today - подобный прогноз на сегодня
10_day_forecast - прогноз погоды на 10 дней
choosing city or area - изменение места для прогноза погоды
help - помощь
-
TOKEN = '<your_token>'
-
- configure the PostgreSQL login for use in config.db(example)
pyconfig = { 'user': '<randomuser>', 'password': '<randompassword>', 'host': '<randomhost', 'port': '<randomport>', 'database': '<randomdatabase>' }
- launch create_table.py
- or set the path to the file in the SQL shell
SOURCE users_property.sql