Catch ydl errors
This commit is contained in:
parent
ebe1b10c92
commit
9b376abfc5
@ -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 = []
|
||||
|
Reference in New Issue
Block a user