Fix quality: use tv_embedded,web player client instead of web-only
YouTube's web client gets SABR format restrictions in 2025-2026 yt-dlp, limiting available streams and causing fallback to 360p. tv_embedded bypasses SABR and exposes the full format list including 4K. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -232,7 +232,7 @@ def fetch_video_metadata(video_id: str) -> dict | None:
|
||||
base_cmd = [
|
||||
"yt-dlp", url,
|
||||
"--dump-json", "--no-download", "--no-playlist",
|
||||
"--extractor-args", "youtube:player_client=web",
|
||||
"--extractor-args", "youtube:player_client=tv_embedded,web",
|
||||
]
|
||||
stdout, stderr, code = _run([*base_cmd, *cookie_args], timeout=30)
|
||||
if code != 0:
|
||||
@@ -646,7 +646,7 @@ def start_download(
|
||||
"--no-part", "--no-mtime",
|
||||
"-o", output_template,
|
||||
"--newline", "--progress", "--no-colors",
|
||||
"--extractor-args", "youtube:player_client=web",
|
||||
"--extractor-args", "youtube:player_client=tv_embedded,web",
|
||||
*cookie_args,
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
|
||||
Reference in New Issue
Block a user