Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/). Versions follow

### Fixed

- **Stale `python -m yt_dont_recommend` examples in the package module docstring** (closes #31): replaced every example in `src/yt_dont_recommend/__init__.py` with the `yt-dont-recommend` console-script form (the package has no `__main__.py`, so the `python -m` form never worked), and added the now-required `--blocklist` flag to each example. The same doc-drift affected `CLAUDE.md` § "End-to-End Test Cycle", which referenced a non-existent top-level `yt_dont_recommend.py` — updated to use the console-script form as well. Also corrected a stale `License: MIT` line in the module docstring to `License: Apache-2.0` to match the main-branch license switch.
- **Scheduler catch-up spawn storm** (closes #17): after the host woke from sleep (or otherwise missed multiple consecutive scheduled slots), the heartbeat loop would spawn one full blocklist+clickbait run per missed slot back-to-back, resulting in three or more overlapping browser sessions fighting over the same Chromium profile. Stale missed slots are now coalesced into a single catch-up run.
- PyPI badges for Python versions and License now render correctly. `pyproject.toml` now declares Trove classifiers (Python 3.10–3.13, `License :: OSI Approved :: Apache Software License`) and a string license field, which is what `shields.io/pypi/pyversions` and `shields.io/pypi/l` read.

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ If no target channels appear, watch and like 2–3 videos from a target channel

### Step 3 — Block
```
.venv/bin/python yt_dont_recommend.py --source /tmp/test-blocklist.txt
.venv/bin/yt-dont-recommend --blocklist --source /tmp/test-blocklist.txt
```
Watch the log output to confirm the channel was blocked. The script exits after exhausting the feed scroll.

Expand All @@ -87,7 +87,7 @@ Optionally, open `myactivity.google.com/page?page=youtube_user_feedback` in Chro
Empty the blocklist file (or remove the channel from it) and re-run:
```
echo "# empty" > /tmp/test-blocklist.txt
.venv/bin/python yt_dont_recommend.py --source /tmp/test-blocklist.txt
.venv/bin/yt-dont-recommend --blocklist --source /tmp/test-blocklist.txt
```
The script will detect the removal, navigate to myactivity, and prompt for Google password verification in the browser window. Once verified, it finds and deletes the "Don't recommend" entry and dismisses the "Deletion complete" dialog automatically.

Expand Down
20 changes: 10 additions & 10 deletions src/yt_dont_recommend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@

Usage:
# First run: will open browser for you to log into YouTube manually
python -m yt_dont_recommend --login
yt-dont-recommend --login

# Subsequent runs: processes the blocklist
python -m yt_dont_recommend
yt-dont-recommend --blocklist

# Dry run: just fetch and show the list without clicking anything
python -m yt_dont_recommend --dry-run
yt-dont-recommend --blocklist --dry-run

# Use a built-in blocklist source
python -m yt_dont_recommend --source deslop
python -m yt_dont_recommend --source aislist
yt-dont-recommend --blocklist --source deslop
yt-dont-recommend --blocklist --source aislist

# Use a local file
python -m yt_dont_recommend --source /path/to/my-blocklist.txt
yt-dont-recommend --blocklist --source /path/to/my-blocklist.txt

# Use a remote URL
python -m yt_dont_recommend --source https://example.com/blocklist.txt
yt-dont-recommend --blocklist --source https://example.com/blocklist.txt

# Limit number of channels to process (useful for testing)
python -m yt_dont_recommend --limit 10
yt-dont-recommend --blocklist --limit 10

# Check whether current selectors still work against live YouTube
python -m yt_dont_recommend --check-selectors
yt-dont-recommend --check-selectors

Requirements:
pip install playwright --break-system-packages
Expand All @@ -46,7 +46,7 @@
UCxxxxxxxxxxxxxxxxxxxxxxxx

Author: Chris Means (generated with Claude)
License: MIT
License: Apache-2.0
"""

import logging
Expand Down
Loading