#33 Bugfix: Try to use field 'picUrl' when 'blurPicUrl' is None.

This commit is contained in:
codezjx 2018-09-30 13:10:44 +08:00
parent b986432b04
commit 6d7920c72c
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ def download_song_by_song(song, download_folder, sub_folder=True):
# download cover # download cover
cover_url = song['album']['blurPicUrl'] cover_url = song['album']['blurPicUrl']
if cover_url is None:
cover_url = song['album']['picUrl']
cover_file_name = 'cover_{}.jpg'.format(song_id) cover_file_name = 'cover_{}.jpg'.format(song_id)
download_file(cover_url, cover_file_name, song_download_folder) download_file(cover_url, cover_file_name, song_download_folder)