mirror of
https://github.com/soimort/you-get.git
synced 2025-02-02 16:24:00 +03:00
Xiami: fix default MIME type (audio/mpeg)
This commit is contained in:
parent
2159e9f11c
commit
ade1252a06
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ _*/
|
|||||||
*.3gp
|
*.3gp
|
||||||
*.asf
|
*.asf
|
||||||
*.flv
|
*.flv
|
||||||
|
*.lrc
|
||||||
*.mkv
|
*.mkv
|
||||||
*.mp3
|
*.mp3
|
||||||
*.mp4
|
*.mp4
|
||||||
|
@ -52,10 +52,10 @@ def xiami_download_song(sid, output_dir = '.', merge = True, info_only = False):
|
|||||||
url = location_dec(i.getElementsByTagName("location")[0].firstChild.nodeValue)
|
url = location_dec(i.getElementsByTagName("location")[0].firstChild.nodeValue)
|
||||||
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
|
lrc_url = i.getElementsByTagName("lyric")[0].firstChild.nodeValue
|
||||||
type, ext, size = url_info(url, faker = True)
|
type, ext, size = url_info(url, faker = True)
|
||||||
if not type:
|
if not ext:
|
||||||
type = 'mp3'
|
ext = 'mp3'
|
||||||
|
|
||||||
print_info(site_info, song_title, type, size)
|
print_info(site_info, song_title, ext, size)
|
||||||
if not info_only:
|
if not info_only:
|
||||||
file_name = "%s - %s - %s" % (song_title, album_name, artist)
|
file_name = "%s - %s - %s" % (song_title, album_name, artist)
|
||||||
download_urls([url], file_name, ext, size, output_dir, merge = merge, faker = True)
|
download_urls([url], file_name, ext, size, output_dir, merge = merge, faker = True)
|
||||||
|
Loading…
Reference in New Issue
Block a user