Switch to web_embedded player client

web_embedded: supports cookies, no Node.js/JS runtime needed, 23 video
formats available. android_vr was skipped by yt-dlp when cookies are
present since that client doesn't support cookie auth.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mattias Tall
2026-05-26 10:12:32 +02:00
parent b58dc26bd4
commit 53ea64ee8a
2 changed files with 3 additions and 3 deletions

View File

@@ -247,7 +247,7 @@ def ytdlp_test(
"yt-dlp", "yt-dlp",
"https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"--dump-json", "--no-download", "--no-playlist", "--dump-json", "--no-download", "--no-playlist",
"--extractor-args", "youtube:player_client=android_vr", "--extractor-args", "youtube:player_client=web_embedded",
*cookie_args, *cookie_args,
], ],
capture_output=True, text=True, timeout=30, capture_output=True, text=True, timeout=30,

View File

@@ -216,7 +216,7 @@ def fetch_video_metadata(video_id: str) -> dict | None:
base_cmd = [ base_cmd = [
"yt-dlp", url, "yt-dlp", url,
"--dump-json", "--no-download", "--no-playlist", "--dump-json", "--no-download", "--no-playlist",
"--extractor-args", "youtube:player_client=android_vr", "--extractor-args", "youtube:player_client=web_embedded",
] ]
stdout, stderr, code = _run([*base_cmd, *cookie_args], timeout=30) stdout, stderr, code = _run([*base_cmd, *cookie_args], timeout=30)
if code != 0: if code != 0:
@@ -567,7 +567,7 @@ def start_download(
"--no-part", "--no-mtime", "--no-part", "--no-mtime",
"-o", output_template, "-o", output_template,
"--newline", "--progress", "--no-colors", "--newline", "--progress", "--no-colors",
"--extractor-args", "youtube:player_client=android_vr", "--extractor-args", "youtube:player_client=web_embedded",
*cookie_args, *cookie_args,
], ],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,