Sane Subscription Feed
|Light theme||Dark theme|
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).
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|
Installation and setup
- Python 3 (3.5+ is recommended, 3.7+ is encouraged)
- The pip package management tool (usually bundled with python installation)
- 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.
Go to https://console.developers.google.com/apis/dashboard and follow these steps:
- Click the drop-down next to the "Google APIs" logo in the banner area (upper left corner).
- Click "New Project".
- Fill in forms and create.
- Click the (presumably blue) "Enable APIs and services" text.
- Search for, and select "YouTube Data API v3"
- Enable "YouTube Data API v3"
- Go to "Credentials" screen
- 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.sampleand rename it
- a) Create an OAuth Client ID
- b) Configure consent screen, usage type is "other".
- c) Download json and select it at the opening prompt or manually save it as
Option B Step by Step in pictures
|Step 1||Step 2||Step 3||Step 4|
|Step 5||Step 6||Step 7||Step 8|
|Step 9a||Step 9b||Step 9c|
Running the application.
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).
- Add application to path (run it again, even if you've run it in the past):
pip install -e .
- Generate migration script:
alembic revision --autogenerate -m "migration msg"
- Migrate database:
alembic upgrade head