mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-17 10:36:35 +00:00
Import missing functions from yt_dlp.utils
This commit is contained in:
parent
c2aa9a4b9f
commit
01a9f07d58
@ -1,4 +1,5 @@
|
|||||||
from yt_dlp import YoutubeDL
|
from yt_dlp import YoutubeDL
|
||||||
|
from yt_dlp.utils import sanitize_url, LazyList
|
||||||
|
|
||||||
class PatchedYoutubeDL(YoutubeDL):
|
class PatchedYoutubeDL(YoutubeDL):
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ class PatchedYoutubeDL(YoutubeDL):
|
|||||||
|
|
||||||
def check_thumbnails(thumbnails):
|
def check_thumbnails(thumbnails):
|
||||||
for t in 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:
|
try:
|
||||||
self.urlopen(HEADRequest(t['url']))
|
self.urlopen(HEADRequest(t['url']))
|
||||||
except network_exceptions as err:
|
except network_exceptions as err:
|
||||||
|
Loading…
Reference in New Issue
Block a user