diff --git a/backend/routers/channels.py b/backend/routers/channels.py index fe79dc8..4c2b604 100644 --- a/backend/routers/channels.py +++ b/backend/routers/channels.py @@ -743,7 +743,6 @@ def _fetch_popular_task(channel_id: int, youtube_channel_id: str, channel_name: "yt-dlp", url, "--dump-json", "--flat-playlist", "--quiet", - "--extractor-args", "youtube:player_client=ios", *ytdlp._cookie_args(), ], timeout=120) diff --git a/backend/services/ytdlp.py b/backend/services/ytdlp.py index 9497c68..f6ae795 100644 --- a/backend/services/ytdlp.py +++ b/backend/services/ytdlp.py @@ -211,7 +211,6 @@ def search_youtube(query: str, max_results: int = 40, polite: bool = False) -> l "--dump-json", "--flat-playlist", "--quiet", - "--extractor-args", "youtube:player_client=ios", *_cookie_args(), ], timeout=60) @@ -310,7 +309,6 @@ def fetch_video_metadata(video_id: str, polite: bool = False) -> dict | None: base_cmd = [ "yt-dlp", url, "--dump-json", "--no-download", "--no-playlist", - "--extractor-args", "youtube:player_client=ios", ] runner = _meta_run if polite else _run stdout, stderr, code = runner([*base_cmd, *cookie_args], timeout=30) @@ -381,7 +379,6 @@ def fetch_channel_metadata(channel_id: str, max_videos: int = 30, start_video: i "--dump-single-json", "--flat-playlist", "--quiet", - "--extractor-args", "youtube:player_client=ios", *_cookie_args(), ] if start_video > 1: @@ -616,7 +613,6 @@ def download_subs_only(video_id: str, subtitle_langs: str) -> bool: "--write-subs", "--write-auto-subs", "--sub-langs", subtitle_langs, "--convert-subs", "vtt", - "--extractor-args", "youtube:player_client=ios", "-o", output_template, *_cookie_args(), ], timeout=60) @@ -632,8 +628,7 @@ def fetch_available_subs(video_id: str) -> dict: BCP-47 lang codes. Manual = human-made; auto = auto-generated captions. """ url = f"https://www.youtube.com/watch?v={video_id}" - base_cmd = ["yt-dlp", url, "--dump-json", "--no-download", "--no-playlist", - "--extractor-args", "youtube:player_client=ios"] + base_cmd = ["yt-dlp", url, "--dump-json", "--no-download", "--no-playlist"] cookie_args = _cookie_args() stdout, _, code = _meta_run([*base_cmd, *cookie_args], timeout=30) if code != 0 and cookie_args: @@ -675,7 +670,7 @@ def fetch_video_comments(youtube_video_id: str, max_comments: int = 20) -> list[ "--write-info-json", "--write-comments", # Format: thread_count,total_count,replies_per_thread,reply_pages - "--extractor-args", f"youtube:player_client=ios;max_comments={max_comments},{max_comments},0,0;comment_sort=top", + "--extractor-args", f"youtube:max_comments={max_comments},{max_comments},0,0;comment_sort=top", "--skip-download", "--no-playlist", "--output", out_tmpl, @@ -932,7 +927,6 @@ def start_download( "--no-part", "--no-mtime", "-o", output_template, "--newline", "--progress", "--no-colors", - "--extractor-args", "youtube:player_client=ios", *subtitle_args, *cookie_args, ]