BluABK / sane-subfeed

A sane subscription feed that - unlike YouTube - actually shows you the feed as-is. No silly omission of videos.
GNU Affero General Public License v3.0
7 stars 1 forks source link
cross-platform python3 qt5 qt5-gui subscription subscription-feed subscriptions youtube youtube-api youtube-dl

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:

2. Requirements:

2a. Optional requirements:

youtube-dl and watchdog (video directory monitoring)

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](docs/readme_assets/01_open_project_dialog.png) | ![step2](docs/readme_assets/02_create_new_project.png) | ![step3](docs/readme_assets/03_name_and_create_project.png) | ![step4](docs/readme_assets/04_enable_api.png) | | Step 5 | Step 6 | Step 7 | Step 8 | |--------|--------|--------|--------| | ![step5](docs/readme_assets/05_select_youtube_data_v3_api.png) | ![step6](docs/readme_assets/06_enable_youtube_data_v3_api.png) | ![step7](docs/readme_assets//07_go_to_credentials_screen.png) | ![step8](docs/readme_assets/08_create_api_key.png) | | Step 9a | Step 9b | Step 9c | |---------|---------|---------| | ![step9a](docs/readme_assets/09a_create_oauth_client.png) | ![step9b](docs/readme_assets/09b_configure_oauth_consent.png) | ![step9c](docs/readme_assets/09c_create_oauth_client.png) |

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.