Skip to content

A sane subscription feed that - unlike YouTube - actually shows you the feed as-is. No silly omission of videos.

License

Notifications You must be signed in to change notification settings

BluABK/sane-subfeed

Repository files navigation

Sane Subscription Feed

Screenshots

Light theme Dark theme
app_preview_light app_preview_dark

How it works

Instead of directly accessing YouTube's unreliable subscription feed (which already has been processed through the infamous "algorithm") it retrieves your subscriptions list and then queries the YouTube API for each channel separately (using a mix of videos.search and videos.list).

Compatibility

This code is primarily tested on the following platforms:

Operating System Python PyQt Arch Tester(s) Last confirmed test
Windows 10 3.7.0 5.11 x64 BluABK, Acca v0.4.0
Linux/Debian 9 (stable) 3.5.3 5.10 x64 BluABK c7e988d
Linux/Arch 3.7.0 5.11 x64 Kitsuna, BluABK Current

Installation and setup

1. Prerequisites:

  • Python 3 (3.5+ is recommended, 3.7+ is encouraged)
  • The pip package management tool (usually bundled with python installation)

2. Requirements:

  • Python 3.6 and above: pip install -r requirements.txt
  • Python 3.5 and below: pip install -r requirements-py35.txt (NB: Will likely be deprecated in near future)

2a. Optional requirements:

youtube-dl and watchdog (video directory monitoring)

  • Any Python version: pip install -r optional-requirements.txt

3. Set up OAuth and API keys (pick one option).

OAuth is required for access to your own youtube account (like retrieving subscriptions list). For anything else API keys is usually what gets used.

Option A: Use public/pre-made.

Caution: This option is prone to daily API quota limit issues, option B is highly encouraged.

Sane will automatically use the public set if no other is added. No further action required.

Option B: Set up your own.

Useful ref: https://developers.google.com/youtube/v3/getting-started

Go to https://console.developers.google.com/apis/dashboard and follow these steps:

  1. Click the drop-down next to the "Google APIs" logo in the banner area (upper left corner).
  2. Click "New Project".
  3. Fill in forms and create.
  4. Click the (presumably blue) "Enable APIs and services" text.
  5. Search for, and select "YouTube Data API v3"
  6. Enable "YouTube Data API v3"
  7. Go to "Credentials" screen
  8. Create an API Key and copy the key either into the prompt when you first start the program or manually into sane_yt_subfeed/resources/keys.json.sample and rename it keys.json
    1. a) Create an OAuth Client ID
    2. b) Configure consent screen, usage type is "other".
    3. c) Download json and select it at the opening prompt or manually save it as sane_yt_subfeed/resources/client_secret.json
Option B Step by Step in pictures

Step 1 Step 2 Step 3 Step 4
step1 step2 step3 step4
Step 5 Step 6 Step 7 Step 8
step5 step6 step7 step8
Step 9a Step 9b Step 9c
step9a step9b step9c

Running the application.

First time?

If it's the first time run: pip install -e .

Why is this necesarry? It's required for non-Windows OS due to a pesky python path bug, and even if you're on Windows just run it anyway, it fixes some first-run issues.

How to run it.

Afterwards you can launch it with: python -m sane_yt_subfeed

If you're using pipenv you can create a shortcut using a one-liner like pipenv run python -m sane_yt_subfeed

Fixes and workarounds.

Migrate Database (if required to).

  1. Add application to path (run it again, even if you've run it in the past):
    pip install -e .
  2. Generate migration script:
    alembic revision --autogenerate -m "migration msg"
  3. Migrate database:
    alembic upgrade head

Notable Wiki articles.