Skip to main content

urls: remove the start_radio parameter in clean_youtube_url()

ID
306f294
date
2026-01-11 15:40:17+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
1902bc3
message
urls: remove the `start_radio` parameter in `clean_youtube_url()`
changed files
4 files, 10 additions, 1 deletion

Changed files

CHANGELOG.md (2514) → CHANGELOG.md (2597)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 42508ca..24416ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # CHANGELOG
 
+## v22 - 2026-01-11
+
+Remove the `start_radio` parameter in `clean_youtube_url()`.
+
 ## v21 - 2025-12-22
 
 Add a method `dates.now()` to return the current time in the timestamp used by all my static sites.

src/chives/__init__.py (391) → src/chives/__init__.py (391)

diff --git a/src/chives/__init__.py b/src/chives/__init__.py
index 70eb860..d7972cc 100644
--- a/src/chives/__init__.py
+++ b/src/chives/__init__.py
@@ -11,4 +11,4 @@ I share across multiple sites.
 
 """
 
-__version__ = "21"
+__version__ = "22"

src/chives/urls.py (3494) → src/chives/urls.py (3526)

diff --git a/src/chives/urls.py b/src/chives/urls.py
index 2ba952d..cb6021a 100644
--- a/src/chives/urls.py
+++ b/src/chives/urls.py
@@ -24,6 +24,7 @@ def clean_youtube_url(url: str) -> str:
 
     u = u.remove("list")
     u = u.remove("index")
+    u = u.remove("start_radio")
     u = u.remove("t")
 
     return str(u)

tests/test_urls.py (4206) → tests/test_urls.py (4359)

diff --git a/tests/test_urls.py b/tests/test_urls.py
index 593903c..b33f807 100644
--- a/tests/test_urls.py
+++ b/tests/test_urls.py
@@ -25,6 +25,10 @@ from chives.urls import (
             "https://www.youtube.com/watch?v=2OHPPSew2nY",
             "https://www.youtube.com/watch?v=2OHPPSew2nY",
         ),
+        (
+            "https://www.youtube.com/watch?v=WiIi7STG3e0&start_radio=1",
+            "https://www.youtube.com/watch?v=WiIi7STG3e0",
+        ),
     ],
 )
 def test_clean_youtube_url(url: str, cleaned_url: str) -> None: