diff --git a/youtube_data/videos.py b/youtube_data/videos.py index d8644f2..543007c 100644 --- a/youtube_data/videos.py +++ b/youtube_data/videos.py @@ -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 = []