Search

Search IconIcon to open search

Export YouTube Subscriptions as RSS Feeds (Python)

Last updatedUpdated: by Simon Späti · CreatedCreated:

For my My RSS Bookmarks and RSS feeds for Data Engineering I wanted to export all my Subscriptions to add to Newsboat, for that I need this format:

1
https://www.youtube.com/feeds/videos.xml?channel_id=UC28n0tlcNSa1iPe5mettocg ! youtube "~voidzilla @coffeezillaextras"

See I need channel_id of each channel and with that you can use https://www.youtube.com/feeds/videos.xml to use for RSS new videos of a channel.

Claude Code wrote me this helpful script to export a locally saved HTML page from all my channels when I go to this YouTube Domain: https://www.youtube.com/feed/channels

The Export via Takeout didn’t wor

This documentation didn’t work: Export YouTube subscriptions - Invidious Documentation, if I exported, the CSV wasn’t there always. So below approach will work

# The Python Script

See GitHub Gist: Creates a file with all RSS feeds for each channel and Title for adding to Newsboat or save/backup · GitHub

# Docs

It does::

  1. Parses the HTML export file to extract the embedded JSON data
  2. Extracts channel IDs, titles, and handles from 254 subscriptions
  3. Formats them according to your specification

Output File is a fiel saved in: youtube_subscriptions_rss.txt

Each line follows above format:

1
https://www.youtube.com/feeds/videos.xml?channel_id={CHANNEL_ID} ! youtube "~{CHANNEL_NAME} {HANDLE}"

# Examples

Here are some examples including the coffeezilla channels you mentioned:

1
2
3
https://www.youtube.com/feeds/videos.xml?channel_id=UC28n0tlcNSa1iPe5mettocg ! youtube "~voidzilla @coffeezillaextras"
https://www.youtube.com/feeds/videos.xml?channel_id=UCFQMnBA3CS502aghlcr0_aw ! youtube "~Coffeezilla @Coffeezilla"
https://www.youtube.com/feeds/videos.xml?channel_id=UCsBjURrPoezykLs9EqgamOA ! youtube "~Fireship @Fireship"

# Excluding Short

There’s a lot of noise with Shorts. If you use Newsboat, there’s a workaround, but only if there’s a tag with shorts. See Newsboat.


Origin: YouTube