mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 05:25:02 +03:00
add support for YouTube short URLs, fix #62
This commit is contained in:
parent
ff7adf5bc4
commit
3b4ea85d5f
@ -1,6 +1,16 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.3dev-20130111
|
||||
---------------
|
||||
|
||||
*Date: 2013-01-11*
|
||||
|
||||
* Add support for:
|
||||
- NetEase (v.163.com)
|
||||
- YouTube short URLs
|
||||
* Vimeo: downloading the highest available quality now.
|
||||
|
||||
0.3dev-20130104
|
||||
---------------
|
||||
|
||||
|
@ -53,7 +53,9 @@ def youtube_download_by_id(id, title = None, output_dir = '.', merge = True, inf
|
||||
download_urls([url], title, ext, size, output_dir, merge = merge)
|
||||
|
||||
def youtube_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
id = parse.parse_qs(parse.urlparse(url).query)['v'][0]
|
||||
id = r1(r'youtu.be/(.*)', url)
|
||||
if not id:
|
||||
id = parse.parse_qs(parse.urlparse(url).query)['v'][0]
|
||||
assert id
|
||||
|
||||
youtube_download_by_id(id, None, output_dir, merge = merge, info_only = info_only)
|
||||
|
@ -42,6 +42,7 @@ def url_to_module(url):
|
||||
'xiami': xiami,
|
||||
'yinyuetai': yinyuetai,
|
||||
'youku': youku,
|
||||
'youtu': youtube,
|
||||
'youtube': youtube,
|
||||
#TODO
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__version__ = '0.3dev-20130104'
|
||||
__date__ = '2013-01-04'
|
||||
__version__ = '0.3dev-20130111'
|
||||
__date__ = '2013-01-11'
|
||||
|
Loading…
Reference in New Issue
Block a user