aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/qqmusic.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/qqmusic.py')
-rw-r--r--youtube_dl/extractor/qqmusic.py5
1 files changed, 3 insertions, 2 deletions
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)