Sync YouTube channel subscriptions to miniflux
Find a file
2026-03-21 13:25:19 +00:00
.gitignore it works for me! 2026-03-21 12:40:31 +00:00
.python-version it works for me! 2026-03-21 12:40:31 +00:00
LICENSE Initial commit 2026-03-20 15:36:40 +00:00
main.py Python 3.12+ 2026-03-21 12:55:37 +00:00
pyproject.toml Python 3.12+ 2026-03-21 12:55:37 +00:00
README.md add note about cache 2026-03-21 13:25:19 +00:00
uv.lock it works for me! 2026-03-21 12:40:31 +00:00

youtube2miniflux

Sync YouTube channel subscriptions to a Miniflux category. Some nerd skills required.

Generate a JSON list of subscriptions

Visit Subscriptions > All channels page

Open a Developer console and paste...

// from: https://www.wezm.net/v2/posts/2024/youtube-subscriptions-opml/
copy(JSON.stringify(Array.from(new Set(Array.prototype.map.call(document.querySelectorAll('a.channel-link'), (link) => link.href))).filter((x) => !x.includes('/channel/')), null, 2))

Channels are copied to clipboard, paste them into subscriptions.json inside the project directory.

Configuration

Create an .envrc (for direnv), or otherwise export into your environment...

export MINIFLUX_URL=https://miniflux.addr/
export MINIFLUX_API_KEY=abc123
export MINIFLUX_CATEGORY_ID=42
# "Channel" for everything, "Videos" to exclude shorts and livestreams
export YT_PREFERRED_FEED=[Channel|Videos|Short videos|Live streams]

Run the script

With uv

Ugh, yes, uv is owned by OpenAI now. Gotta get a new Python packaging habit.

cd /path/to/youtube2miniflux
uv run main.py

With Python 3.12+ and a venv

# bash assumed, but if you're using fish too, you know what to do
cd /path/to/youtube2miniflux
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python3 ./main.py

Data gathered from YouTube is cached between runs to speed things up and avoid unnecessary hits when running the script repeatedly. For now there's no refresh mechanism built-in. The cache is in a platform-appropriate place if you want to just trash it... ~/.cache/youtube2miniflux/subscriptions-data.json on Linux.