Telegram notification about new live streams in YouTube

dm9pZCAq ab8f6d769a add README.md 4 days ago
.gitignore 2a385d3a64 add .gitignore 4 days ago
LICENSE 6990315cd4 add LICENSE 5 days ago
README.md ab8f6d769a add README.md 4 days ago
config.py 1fe9e97234 v0.0.1 4 days ago
database.py 1fe9e97234 v0.0.1 4 days ago
get_chat_id.py 6a1863df87 add get_chat_id.py 4 days ago
get_yt_id.py 20d5f350dd add get_yt_id.py 4 days ago
main.py 1fe9e97234 v0.0.1 4 days ago
requirements.txt 3e196f91b0 add requirements.txt 4 days ago

README.md

yt-notify

util for notification about new live streams from YouTube to your Telegram channel

requirements
usage
$ python3 -m venv venv
$ . ./venv/bin/activate
$ pip install -r requirements.txt

$ python -OO -- main.py

channels list

format

[
  {
    "id": "UC2eYFnH61tmytImy1mTYvhA"
  },
  {
    "id": "UCVls1GmFKf6WlTraIb_IaJg",
    "timeout": 300,
    "chat": 1010101
  }
]
mandatory:
optional:
  • timeout - timeout in seconds between new videos info requests
  • chat - you can specify another Telegram chat locally, to use it instead of CHAT_ID from config.py

utils

get_chat_id.py

get id of telegram channel for CHAT_ID in config.py

usage

before running you need specify your API_ID, API_HASH and TOKEN in config.py

then add bot to your channel and send any message to this channel and bot will print id of your channel

get_yt_id.py

get id of YouTube channel by name

extra dependency
usage
$ python3 get_yt_id.py https://www.youtube.com/c/LukeSmithxyz
UC2eYFnH61tmytImy1mTYvhA