mirror of
https://github.com/soimort/you-get.git
synced 2025-02-09 03:37:52 +03:00
commit
a0e6bae019
@ -1,6 +1,14 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
0.3.9
|
||||||
|
-----
|
||||||
|
|
||||||
|
*Date: 2013-04-12*
|
||||||
|
|
||||||
|
* Add support for:
|
||||||
|
- Freesound
|
||||||
|
|
||||||
0.3.8
|
0.3.8
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -134,10 +134,13 @@ def url_info(url, faker = False):
|
|||||||
else:
|
else:
|
||||||
type = None
|
type = None
|
||||||
if headers['content-disposition']:
|
if headers['content-disposition']:
|
||||||
filename = parse.unquote(r1(r'filename="?(.+)"?', headers['content-disposition']))
|
try:
|
||||||
if len(filename.split('.')) > 1:
|
filename = parse.unquote(r1(r'filename="?(.+)"?', headers['content-disposition']))
|
||||||
ext = filename.split('.')[-1]
|
if len(filename.split('.')) > 1:
|
||||||
else:
|
ext = filename.split('.')[-1]
|
||||||
|
else:
|
||||||
|
ext = None
|
||||||
|
except:
|
||||||
ext = None
|
ext = None
|
||||||
else:
|
else:
|
||||||
ext = None
|
ext = None
|
||||||
|
@ -43,6 +43,8 @@ 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 ext:
|
||||||
|
ext = 'mp3'
|
||||||
|
|
||||||
print_info(site_info, song_title, type, size)
|
print_info(site_info, song_title, type, size)
|
||||||
if not info_only:
|
if not info_only:
|
||||||
@ -66,6 +68,8 @@ def xiami_download_showcollect(cid, output_dir = '.', merge = True, info_only =
|
|||||||
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 ext:
|
||||||
|
ext = 'mp3'
|
||||||
|
|
||||||
print_info(site_info, song_title, type, size)
|
print_info(site_info, song_title, type, size)
|
||||||
if not info_only:
|
if not info_only:
|
||||||
@ -88,7 +92,9 @@ def xiami_download_album(aid, 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 ext:
|
||||||
|
ext = 'mp3'
|
||||||
|
|
||||||
print_info(site_info, song_title, type, size)
|
print_info(site_info, song_title, type, size)
|
||||||
if not info_only:
|
if not info_only:
|
||||||
file_name = "%02d.%s" % (track_nr, song_title)
|
file_name = "%02d.%s" % (track_nr, song_title)
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
__all__ = ['__version__', '__date__']
|
__all__ = ['__version__', '__date__']
|
||||||
|
|
||||||
__version__ = '0.3.8'
|
__version__ = '0.3.9'
|
||||||
__date__ = '2013-04-05'
|
__date__ = '2013-04-12'
|
||||||
|
@ -39,11 +39,6 @@ class YouGetTests(unittest.TestCase):
|
|||||||
"http://www.mixcloud.com/DJVadim/north-america-are-you-ready/",
|
"http://www.mixcloud.com/DJVadim/north-america-are-you-ready/",
|
||||||
])
|
])
|
||||||
|
|
||||||
def test_vid48(self):
|
|
||||||
test_urls([
|
|
||||||
"http://vid48.com/watch_video.php?v=KXUSG8169U41",
|
|
||||||
])
|
|
||||||
|
|
||||||
def test_vimeo(self):
|
def test_vimeo(self):
|
||||||
test_urls([
|
test_urls([
|
||||||
"http://vimeo.com/56810854",
|
"http://vimeo.com/56810854",
|
||||||
|
Loading…
Reference in New Issue
Block a user