YouTube subscriptions viewer
A local web app that displays your YouTube subscription videos sorted by a nowcast ranking algorithm tuned for ad hoc runs.
Ranking Algorithm
Videos are ranked by a core score designed for ad hoc runs and then filtered by the selected facet window (2 days, 1 week, 2 weeks, 1 month). This means each facet shows the strongest videos within that window, not a globally recency-biased list.
Core score components:
-
Nowcast vs Expected (55% weight)
- Compares current views to age-adjusted expected views from each channel's
baseline_48h.
- Compares current views to age-adjusted expected views from each channel's
-
Velocity Shock (20% weight)
- Compares current views/hour to expected slope at the video's current age.
-
Subscriber Reach (15% weight)
- Views relative to subscriber count with diminishing returns.
-
Duration Prior (5% weight)
- Lightweight bias for durations that tend to produce stable performance.
Score modifiers:
- Confidence multiplier (0.75-1.05) lowers rank impact for weak parse confidence/stale baselines.
- Early breakout boost (up to +0.12) helps very new videos that are simultaneously strong in nowcast and velocity.
Notes:
- Facet sorting uses facet score keys (
day,week,twoweeks,month) backed by the core score. - Freshness diagnostics are still recorded in details for transparency, but recency is not applied as a hard rank penalty across wider windows.
Overview
A tool to track YouTube subscriptions and surface high-performing videos. It consists of:
- A channel stats scraper that collects subscriber counts and a channel
baseline_48hproxy - A video scraper that collects new videos from subscribed channels
- Observation tracking per scrape run for better point-in-time ranking
- A static page generator that creates a feed of videos sorted by performance
Quick start (recommended: uvx)
You can run the tool directly with uvx — no cloning and no manual installs:
uvx ytsubs@latest scrape-channels
uvx ytsubs@latest scrape-videos
uvx ytsubs@latest open
Setup (local dev)
-
Requirements:
- Python 3.12+
- Google Chrome browser
-
(Optional) Install tool versions with mise:
mise install
- Install dependencies with uv:
uv sync
Database reset
If local schema/data gets out of sync, reset your local DB:
rm -f ~/.local/state/ytsubs/youtube.db
Usage
First-time setup
Run these commands in order:
uv run ytsubs scrape-channels # When Chrome opens, log in to YouTube
uv run ytsubs scrape-videos # Collect recent videos and generate the feed
uv run ytsubs open # Open the feed in your browser
Your YouTube login is saved in ~/.local/state/ytsubs/chrome_profile (or $XDG_STATE_HOME/ytsubs/chrome_profile), so you'll only need to log in once. Subsequent runs will reuse this profile.
Regular usage
- Collect video data:
uv run ytsubs scrape-videos # Run daily to get new videos
- Update channel statistics (subscriber counts and baseline views):
uv run ytsubs scrape-channels # Run occasionally (e.g., monthly)
- Open the feed:
uv run ytsubs open # Opens the latest feed
The feed is written to ~/.local/state/ytsubs/ytsubs_feed.html (or $XDG_STATE_HOME/ytsubs/ytsubs_feed.html).
Data locations (XDG)
- Chrome profile:
~/.local/state/ytsubs/chrome_profile(or$XDG_STATE_HOME/ytsubs/chrome_profile) - SQLite DB:
~/.local/state/ytsubs/youtube.db(or$XDG_STATE_HOME/ytsubs/youtube.db) - Feed output:
~/.local/state/ytsubs/ytsubs_feed.html(or$XDG_STATE_HOME/ytsubs/ytsubs_feed.html)
Debug tooling
uv run ytsubs debug-scrape --scrolls 4 --filter "gymkhana"
Development
The project uses:
- SQLite for data storage
- Playwright for web scraping
- Preact for the frontend (served statically)
Makefile commands
The project includes several helpful make commands:
make clean: Remove Python cache filesmake reset-db: Reset database to empty tablesmake reset-videos: Clear only the videos tablemake reset-channels: Clear only the channels table
Requirements
- Python 3.12+
- Google Chrome
Metadata
Release files for ytsubs 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ytsubs-0.2.5.tar.gz | 39.4 kB | With provenance | Details for ytsubs-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ytsubs-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for ytsubs-0.2.5-py3-none-any.whl |
Total release size: 77.4 kB
Release files / ytsubs-0.2.5.tar.gz
| Download URL | ytsubs-0.2.5.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
456fd8adce7bcd84bf73fa3b28b0dc194c7be270790004f87b492ef17072e96e
|
|
BLAKE2b-256 checksum How to use checksums |
b4adff7c2435d1e81332644da1961b871542398f431b0eb9b2561d79a7e8f780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logRelease files / ytsubs-0.2.5-py3-none-any.whl
| Download URL | ytsubs-0.2.5-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ea47ad7d5d1fa474fe12cec2dc89d6f276e47351f31ef2de3f46f15e91361b1
|
|
BLAKE2b-256 checksum How to use checksums |
db472e2fe93fcdfea6f7b30f53ee0ddbe82d53debe761d4287f57ece6cab6fe2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logSecurity for ytsubs 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ytsubs-0.2.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.