diff --git a/main.py b/main.py index 221e2b5..f609143 100755 --- a/main.py +++ b/main.py @@ -568,6 +568,10 @@ async def process_radio_track(video_link, video_id, title): "jpg", "--js-runtimes", "quickjs", + # Refresh EJS challenge-solver scripts from GitHub at runtime so a + # stale image doesn't break downloads when YouTube rotates challenges. + "--remote-components", + "ejs:github", "--output", f"{base_filepath}.%(ext)s", video_link, diff --git a/requirements.txt b/requirements.txt index 318271b..fe3ed23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ matrix-nio == 0.24.0 google-auth-oauthlib == 1.3.1 google-api-python-client == 2.194.0 -yt-dlp +# The "default" extra pulls in yt-dlp-ejs, the JS challenge solver scripts +# YouTube requires for downloads. Keep it in lockstep with yt-dlp. +yt-dlp[default] mutagen