Catch ydl errors

This commit is contained in:
pluja 2020-10-05 15:20:08 +02:00
parent ebe1b10c92
commit 9b376abfc5

View File

@ -126,9 +126,13 @@ def get_video_primary_info(datad, datai):
ydl = YoutubeDL()
data = ydl.extract_info(details['videoId'], False)
while not data['formats']:
try:
data = ydl.extract_info(details['videoId'], False)
while not data['formats']:
data = ydl.extract_info(details['videoId'], False)
except Exception as e:
premieres = e
## Get audio
audio_urls = []