scripts/podcasts
2023-02-20 13:56:01 +03:00
..
.env.template added podcast script 2023-02-20 13:56:01 +03:00
podcasts.py added podcast script 2023-02-20 13:56:01 +03:00
README.md added podcast script 2023-02-20 13:56:01 +03:00
requirement.txt added podcast script 2023-02-20 13:56:01 +03:00

Podcast loader script

Script to load current listening track from yandex music and send it to telegram chat.

Configuration

Obtain yandex music token - https://music-yandex-bot.ru/

Obtain telegram api id and hash for local telegram image - https://my.telegram.org/

Installation

OPTIONAL: start local telegram bot server for file upload

$ docker run -d -p 8081:8081 --name=telegram-bot-api --restart=always -v telegram-bot-api-data:/var/lib/telegram-bot-api -e TELEGRAM_API_ID=<api_id> -e TELEGRAM_API_HASH=<api-hash> aiogram/telegram-bot-api:latest
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirement.txt

Run

program runs via python-daemon

$ python3 podcasts.py

Note: can be modified to send all(unique) tracks, just remove if "podcast" in last_track.type check