continue to fix lrc missing bug in different downloading mode, namely album mode, collection mode.

This commit is contained in:
Eskibear 2014-02-23 00:49:43 +08:00
parent 9d31c599af
commit 5c05cd666b

View File

@ -81,7 +81,10 @@ def xiami_download_showcollect(cid, output_dir = '.', merge = True, info_only =
album_name = i.getElementsByTagName("album_name")[0].firstChild.nodeValue
song_title = i.getElementsByTagName("title")[0].firstChild.nodeValue
url = location_dec(i.getElementsByTagName("location")[0].firstChild.nodeValue)
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
try:
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
except:
pass
type, ext, size = url_info(url, faker = True)
if not ext:
ext = 'mp3'
@ -109,7 +112,10 @@ def xiami_download_album(aid, output_dir = '.', merge = True, info_only = False)
for i in tracks:
song_title = i.getElementsByTagName("title")[0].firstChild.nodeValue
url = location_dec(i.getElementsByTagName("location")[0].firstChild.nodeValue)
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
try:
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
except:
pass
if not pic_exist:
pic_url = i.getElementsByTagName("pic")[0].firstChild.nodeValue
type, ext, size = url_info(url, faker = True)