aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/InfoExtractors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index d661d517d..a9646433e 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1478,6 +1478,10 @@ class YoutubeSearchIE(InfoExtractor):
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