Fix double _cookie_args() call in download; fix diagnostic player client
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -230,7 +230,7 @@ def ytdlp_test(
|
||||
"yt-dlp",
|
||||
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
||||
"--dump-json", "--no-download", "--no-playlist",
|
||||
"--extractor-args", "youtube:player_client=tv,ios,web",
|
||||
"--extractor-args", "youtube:player_client=web",
|
||||
*cookie_args,
|
||||
],
|
||||
capture_output=True, text=True, timeout=30,
|
||||
|
||||
@@ -556,7 +556,7 @@ def start_download(
|
||||
def _run_download():
|
||||
with _SEMAPHORE:
|
||||
cookie_args = _cookie_args()
|
||||
print(f"[ytdlp] cookie_args={cookie_args!r} file_exists={Path(cookie_args[1]).exists() if len(cookie_args) == 2 and cookie_args[0] == '--cookies' else 'n/a'}", flush=True)
|
||||
print(f"[ytdlp] cookie_args={cookie_args!r}", flush=True)
|
||||
process = subprocess.Popen(
|
||||
[
|
||||
"yt-dlp", url,
|
||||
@@ -568,7 +568,7 @@ def start_download(
|
||||
"-o", output_template,
|
||||
"--newline", "--progress", "--no-colors",
|
||||
"--extractor-args", "youtube:player_client=web",
|
||||
*_cookie_args(),
|
||||
*cookie_args,
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
|
||||
Reference in New Issue
Block a user