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() ydl = YoutubeDL()
data = ydl.extract_info(details['videoId'], False) try:
while not data['formats']:
data = ydl.extract_info(details['videoId'], False) 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 ## Get audio
audio_urls = [] audio_urls = []