fix: YouTube 403 on download — removed aria2c for YouTube, fixed title fetch

This commit is contained in:
Renato
2026-07-07 15:43:18 +02:00
parent b67d3f3a82
commit 5c5e00433a
+8 -1
View File
@@ -155,7 +155,14 @@ async def get_video_title(url: str) -> str:
[
YT_DL_PYTHON, "-c",
f"import yt_dlp, sys; "
f"ydl = yt_dlp.YoutubeDL({{'quiet': True, 'no_warnings': True, 'cookiesfrombrowser': ('chrome',)}}); "
f"opts = {{"
f" 'quiet': True, 'no_warnings': True,"
f" 'cookiesfrombrowser': ('chrome',),"
f" 'js_runtimes': {{'node': {{}}}},"
f" 'extractor_args': {{'youtube': {{'player_client': ['tv', 'web']}}}},"
f" 'format': 'worst[height<=360]+worstaudio/worst[height<=360]',"
f"}}; "
f"ydl = yt_dlp.YoutubeDL(opts); "
f"info = ydl.extract_info(sys.argv[1], download=False); "
f"print(info.get('title', '') if info else '')",
url,