diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-04-27 10:41:52 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-04-27 10:41:52 +0200 |
commit | aba8df23edf4f1078b163b490174c2d766432b55 (patch) | |
tree | 65d5dd2dc4256e3d46ec5a1c78c29b464d2c2326 /youtube_dl | |
parent | 3820df0106d6065f50cc1eb90823906410dc9543 (diff) |
YoutubePlaylistIE: don't crash with empty lists (related #808)
The playlist_title wasn't initialized.
Diffstat (limited to 'youtube_dl')
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 3450f0d17..967f6a100 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -1723,12 +1723,11 @@ class YoutubePlaylistIE(InfoExtractor): if 'feed' not in response: self._downloader.report_error(u'Got a malformed response from YouTube API') return + playlist_title = response['feed']['title']['$t'] if 'entry' not in response['feed']: # Number of videos is a multiple of self._MAX_RESULTS break - playlist_title = response['feed']['title']['$t'] - videos += [ (entry['yt$position']['$t'], entry['content']['src']) for entry in response['feed']['entry'] if 'content' in entry ] |