From aba8df23edf4f1078b163b490174c2d766432b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Sat, 27 Apr 2013 10:41:52 +0200 Subject: YoutubePlaylistIE: don't crash with empty lists (related #808) The playlist_title wasn't initialized. --- youtube_dl/InfoExtractors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'youtube_dl/InfoExtractors.py') 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 ] -- cgit v1.2.3