aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/InfoExtractors.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-04-27 10:41:52 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-04-27 10:41:52 +0200
commitaba8df23edf4f1078b163b490174c2d766432b55 (patch)
tree65d5dd2dc4256e3d46ec5a1c78c29b464d2c2326 /youtube_dl/InfoExtractors.py
parent3820df0106d6065f50cc1eb90823906410dc9543 (diff)
downloadyoutube-dl-aba8df23edf4f1078b163b490174c2d766432b55.tar.xz
YoutubePlaylistIE: don't crash with empty lists (related #808)
The playlist_title wasn't initialized.
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rwxr-xr-xyoutube_dl/InfoExtractors.py3
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 ]