Light theme | Dark theme |
---|---|
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 |
Linux/Arch | 3.7.0 | 5.11 | x64 | Kitsuna, BluABK | Current |
- 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)
youtube-dl and watchdog (video directory monitoring)
- Any Python version:
pip install -r optional-requirements.txt
OAuth is required for access to your own youtube account (like retrieving subscriptions list). For anything else API keys is usually what gets used.
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.
Useful ref: https://developers.google.com/youtube/v3/getting-started
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.sample
and rename itkeys.json
-
- 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
sane_yt_subfeed/resources/client_secret.json
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 |
---|---|---|
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.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
- 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