use check_formats only on download, not in info extract

This commit is contained in:
Simon 2025-06-03 20:58:57 +07:00
parent a961c8f175
commit 62ea518e1b
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -20,7 +20,6 @@ class YtWrap:
OBS_BASE = {
"default_search": "ytsearch",
"quiet": True,
"check_formats": "selected",
"socket_timeout": 10,
"extractor_retries": 3,
"retries": 10,
@ -66,6 +65,7 @@ class YtWrap:
def download(self, url):
"""make download request"""
self.obs.update({"check_formats": "selected"})
with yt_dlp.YoutubeDL(self.obs) as ydl:
try:
ydl.download([url])