From: Yen Chi Hsuan Date: Thu, 4 Jun 2015 16:52:18 +0000 (+0800) Subject: [qqmusic:toplist] List name and description are optional X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9d4f213f90d6024c7748f4defdc7b45f2351b0da;p=youtube-dl [qqmusic:toplist] List name and description are optional --- diff --git a/youtube_dl/extractor/qqmusic.py b/youtube_dl/extractor/qqmusic.py index 9943fcddb..f773332a8 100644 --- a/youtube_dl/extractor/qqmusic.py +++ b/youtube_dl/extractor/qqmusic.py @@ -222,6 +222,7 @@ class QQMusicToplistIE(QQPlaylistBaseIE): ) for song in toplist_json['songlist'] ] - list_name = toplist_json['topinfo']['ListName'] - list_description = toplist_json['topinfo']['info'] + topinfo = toplist_json.get('topinfo', {}) + list_name = topinfo.get('ListName') + list_description = topinfo.get('info') return self.playlist_result(entries, list_id, list_name, list_description)