Giter VIP home page Giter VIP logo

youtubetelegramsummaries's Introduction

YouTube to Telegram Summaries

This program use github actions to check every hour if there are new videos in a list of youtube channels, than if there is a new one, uses LangChain (OpenAI model) to summarize the content of the video and send the summary to a telegram group.

It only works with english at the moment.

TL;DR:

  • Check for new videos from a list of YouTube channels

  • When a new video is published, take the transcript and summarize it

  • Send the summary to a Telegram group

Launch on a single video

docker run -e OPENAI_API_KEY=xx-xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX -e LANGUAGE=en docker.io/stell0/youtubetelegramsummaries python3 src/main.py https://www.youtube.com/watch?v=dQw4w9WgXcQ

Launch using docker

Export variables

export OPENAI_API_KEY=xx-xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX
export TELEGRAM_CHAT_ID=-123456789
export TELEGRAM_BOT_TOKEN=1234567890:XXX-XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX
export CHANNEL_LIST=https://www.youtube.com/@allin https://www.youtube.com/@lexfridman https://www.youtube.com/@hubermanlab"

And launch

docker run -e TELEGRAM_CHAT_ID -e TELEGRAM_BOT_TOKEN -e OPENAI_API_KEY -e CHANNEL_LIST stell0/youtubetelegramsummaries:latest

Launch manually

Clone repo

git clone [email protected]:Stell0/youtubetelegramsummaries.git
cd youtubetelegramsummaries

Install requirements

pip install -r requirements.txt

Export variables

export OPENAI_API_KEY=xx-xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX
export TELEGRAM_CHAT_ID=-123456789
export TELEGRAM_BOT_TOKEN=1234567890:XXX-XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX
export CHANNEL_LIST=https://www.youtube.com/@allin https://www.youtube.com/@hubermanlab https://www.youtube.com/@JosephCarlsonShow"

And launch

python3 src/main.py

You can also specify the video url if you want to process only one

python3 src/main.py https://www.youtube.com/watch?v=3tEcLAud7Nc

Launch every hour using GitHub Actions:

  • fork this repository

NOTE: go to the Actions tab and enable the scheduled workflows because they are disabled for the forked repositories.

TELEGRAM_CHAT_ID: the ID of the telegram chat you whant your message to be sent

TELEGRAM_BOT_TOKEN: a telegram bot token

OPENAI_API_KEY: your OpenAI API key

CHANNEL_LIST: list of youtube channels, for instance:

https://www.youtube.com/@allin
https://www.youtube.com/@lexfridman
https://www.youtube.com/@hubermanlab

LANGUAGE: transcription language to use. Default "en"

then wait ⏱️ (cron is launched every hour and take videos published during the previous hour)

youtubetelegramsummaries's People

Contributors

stell0 avatar sebastianmb-it avatar

Stargazers

 avatar

Watchers

 avatar Kostas Georgiou avatar

Forkers

sebastianmb-it

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.