diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-05 00:52:18 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-06-05 00:52:18 +0800 |
commit | 9d4f213f90d6024c7748f4defdc7b45f2351b0da (patch) | |
tree | b43f3ec7e5ee17b79fbc75b9d6cc1dbbc81505cd /youtube_dl | |
parent | 168db222c6777609c51f74cf8d7ca42ffd57f7d4 (diff) |
[qqmusic:toplist] List name and description are optional
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/qqmusic.py | 5 |
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) |