Import missing functions from yt_dlp.utils

This commit is contained in:
tcely 2025-03-08 11:59:44 -05:00 committed by GitHub
parent c2aa9a4b9f
commit 01a9f07d58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
from yt_dlp import YoutubeDL
from yt_dlp.utils import sanitize_url, LazyList
class PatchedYoutubeDL(YoutubeDL):
@ -14,7 +15,7 @@ class PatchedYoutubeDL(YoutubeDL):
def check_thumbnails(thumbnails):
for t in thumbnails:
self.to_screen(f'[info] Testing thumbnail {t["id"]}')
self.to_screen(f'[info] Testing thumbnail {t["id"]}: {t["url"]!r}')
try:
self.urlopen(HEADRequest(t['url']))
except network_exceptions as err: