Browse Source

[youtube:search] Mark "no results found" error as expected

totalwebcasting
Philipp Hagemeister 11 years ago
parent
commit
07ad22b8af
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      youtube_dl/extractor/youtube.py

+ 2
- 1
youtube_dl/extractor/youtube.py View File

@ -1694,7 +1694,8 @@ class YoutubeSearchIE(SearchInfoExtractor):
api_response = data['data']
if 'items' not in api_response:
raise ExtractorError(u'[youtube] No video results')
raise ExtractorError(
u'[youtube] No video results', expected=True)
new_ids = list(video['id'] for video in api_response['items'])
video_ids += new_ids


Loading…
Cancel
Save