]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[qqmusic:toplist] List name and description are optional
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 4 Jun 2015 16:52:18 +0000 (00:52 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 4 Jun 2015 16:52:18 +0000 (00:52 +0800)
youtube_dl/extractor/qqmusic.py

index 9943fcddb31792c25f2b7b6247847029649780f0..f773332a895b1b147ae9609229700a0c887a362f 100644 (file)
@@ -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)