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()
|
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 = []
|
||||||
|
Reference in New Issue
Block a user