mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-18 13:20:46 +02:00
Merge pull request #715 from joksnet/no_video_results
[YT Search] No results if items is not in response
This commit is contained in:
commit
790d4fcbe1
@ -1478,6 +1478,10 @@ def _download_n_results(self, query, n):
|
||||
return
|
||||
api_response = json.loads(data)['data']
|
||||
|
||||
if not 'items' in api_response:
|
||||
self._downloader.trouble(u'[youtube] No video results')
|
||||
return
|
||||
|
||||
new_ids = list(video['id'] for video in api_response['items'])
|
||||
video_ids += new_ids
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user