Try tv player client first to bypass datacenter IP bot detection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
inputnoise
2026-05-25 21:45:05 +02:00
parent 4ab8245a93
commit 32af6c1c49

View File

@@ -219,7 +219,7 @@ def fetch_video_metadata(video_id: str) -> dict | None:
"--dump-json", "--dump-json",
"--no-download", "--no-download",
"--no-playlist", "--no-playlist",
"--extractor-args", "youtube:player_client=ios,web", "--extractor-args", "youtube:player_client=tv,ios,web",
*cookie_args, *cookie_args,
], timeout=30) ], timeout=30)
if code != 0: if code != 0:
@@ -479,7 +479,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=ios,web", "--extractor-args", "youtube:player_client=tv,ios,web",
*_cookie_args(), *_cookie_args(),
], ],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,