A small Flask app which parses YouTube Atom feed via feedparser and generates a new one via feedgen.
The problem this app solves is that YouTube feeds feature some non-standard tags, which elfeed (my RSS client of choice) can’t recognize. So entries from a YouTube feed lack preview and description.
Invidious feeds don’t have such a problem, but public instances seem to be unstable, and hosting one takes some resources. Hence this program.
Install the dependencies:
pip install -r requirements.txt
Change a token in .env file:
TOKEN=secret
Run for production via a server of your choice, I prefer gunicorn:
gunicorn main:app
If you want to deploy the thing behind a reverse proxy, you’d have to do something like this (for nginx):
location /yt-rss/ {
rewrite /yt-rss/(.*) /$1 break;
proxy_pass http://127.0.0.1:8000;
}
A feed for a channel will be available at
http://localhost:8000/<channel_id>?token=<token>