Code Monkey home page Code Monkey logo

bralbral / telegram-youtube-notifier Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 227 KB

Simple Telegram notifier about live streams on selected Youtube channels

Home Page: https://hub.docker.com/r/bral1488/telegram-youtube-notifier

License: Apache License 2.0

Dockerfile 1.59% Shell 0.57% Python 97.16% Mako 0.68%
telegram youtube aiogram apscheduler sqlalchemy docker jinja2 youtube-dlp bot aiosqlite alembic sqlite aiogram-dialog k3s k8s kubernetes

telegram-youtube-notifier's Introduction

telegram-youtube-notifier-bot

⚠️ Warning: project is still under development, use with caution.

Simple Youtube LiveStreams notifier in telegram based on youtube-dlp and aiogram .

Use this bot to receive periodic reports on live broadcasts on YouTube and generate and send the report to telegram.

The current version of the bot works in the telegram channel НАСРАНО.

Features

  1. Generating a custom report using jinja.

  2. Administration of channels (adding/disabling/deleting) through telegram windows using aiogram-dialog.

  3. Regularly checking active channels using aps-schedule.

  4. Getting information about streams using youtube-dlp.

Commands

Command Scope Description
add_channel User Add youtube channel
channels User Channels Administration
cancel User Clear current fsm-state (if error)
add_user Superuser Add user
add_channels Superuser Bulk channels importing from file
scheduler_start Superuser Start scheduling periodic tasks of fetching information about streams
scheduler_pause Superuser Pause scheduling periodic tasks of fetching information about streams

Database schema

Deploy

Install from source

Tested on Ubuntu 22.04, python 3.11

Just copy source code:

git clone https://github.com/bralbral/telegram-youtube-notifier.git

Install requirements:

pip install -r requirements.txt

Fill config.yml and place it to root dir. (In parent dir to src)

Run:

python3 -m src

Install with Docker

Stable release with main tag on dockerhub

Just copy docker-compose.yml and fill in config.yaml.

Run containers:

docker-compose up -d or if you have new docker docker compose up -d

Of course, you can build image yourself:

Just copy source code:

git clone https://github.com/bralbral/telegram-youtube-notifier.git

and build docker image:

docker build -t <your_image_name>:<your_tag_name>

And use this image with docker-compose.yml from deploy dir.

Install with k8s

Stable release with main tag on dockerhub

Manifests located in k8s directory.

It consists of Namespace, ConfigMap, PersistenVolume, PersistentVolumeClaim, and Deployment files.

You need fill sections in 01_configmap.yaml and 02_persistent_volume.yaml files.

⚠️ Deployment use storageClassName: local-path. A detailed description can be found here

Apply deployment:

kubectl apply -f <directory with configs>

Or you can do it step by step:

kubectl apply -f <file from config dir>

Setup Cookies

You can use own cookies for yt-dlp extractors.

Just install Get cookies.txt and extract cookies in Netscape HTTP Cookie File format.

Hosting

You can rent a server from various hosters, for example from Aeza.

By registering via the link you will support the project and receive a 15% bonus on your balance, which will be valid for 24 hours.

The bot will require the simplest VDS, in rubles this is approximately 100-200 for promotional offers, or about 500 rubles per month.

Develop and Contribute

Feel free to create issue or pull request.

For development, you should install the requirements from requirements_dev.txt

pip install -r requirements_dev.txt

Use pre-commit.sh before commit.

telegram-youtube-notifier's People

Contributors

bralbral avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

telegram-youtube-notifier's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.