mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 05:25:02 +03:00
add support for Mixcloud, fix #91
This commit is contained in:
parent
11cf8e4b73
commit
95aba7fdcb
@ -1,6 +1,16 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
0.3dev-20130201
|
||||
---------------
|
||||
|
||||
*Date: 2013-02-01*
|
||||
|
||||
* Add support for:
|
||||
- Mixcloud
|
||||
- Facebook
|
||||
- Joy.cn
|
||||
|
||||
0.3dev-20130125
|
||||
---------------
|
||||
|
||||
|
@ -17,6 +17,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
* Google+ <http://plus.google.com>
|
||||
* Tumblr <http://www.tumblr.com>
|
||||
* SoundCloud <http://soundcloud.com>
|
||||
* Mixcloud <http://www.mixcloud.com>
|
||||
* Youku (优酷) <http://www.youku.com>
|
||||
* Tudou (土豆) <http://www.tudou.com>
|
||||
* YinYueTai (音悦台) <http://www.yinyuetai.com>
|
||||
@ -211,6 +212,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
* Google+ <http://plus.google.com>
|
||||
* Tumblr <http://www.tumblr.com>
|
||||
* SoundCloud <http://soundcloud.com>
|
||||
* Mixcloud <http://www.mixcloud.com>
|
||||
* 优酷 <http://www.youku.com>
|
||||
* 土豆 <http://www.tudou.com>
|
||||
* 音悦台 <http://www.yinyuetai.com>
|
||||
|
@ -20,6 +20,7 @@ Supported Sites (As of Now)
|
||||
* Google+ http://plus.google.com
|
||||
* Tumblr http://www.tumblr.com
|
||||
* SoundCloud http://soundcloud.com
|
||||
* Mixcloud http://www.mixcloud.com
|
||||
* Youku (优酷) http://www.youku.com
|
||||
* Tudou (土豆) http://www.tudou.com
|
||||
* YinYueTai (音悦台) http://www.yinyuetai.com
|
||||
|
@ -10,6 +10,7 @@ from .ifeng import *
|
||||
from .iqiyi import *
|
||||
from .joy import *
|
||||
from .ku6 import *
|
||||
from .mixcloud import *
|
||||
from .netease import *
|
||||
from .pptv import *
|
||||
from .qq import *
|
||||
|
28
you_get/downloader/mixcloud.py
Normal file
28
you_get/downloader/mixcloud.py
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__all__ = ['mixcloud_download']
|
||||
|
||||
from ..common import *
|
||||
|
||||
def mixcloud_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
html = get_html(url)
|
||||
title = r1(r'<meta property="og:title" content="([^"]*)"', html)
|
||||
url = r1("data-preview-url=\"([^\"]+)\"", html)
|
||||
|
||||
url = re.sub(r'previews', r'cloudcasts/originals', url)
|
||||
for i in range(10, 30):
|
||||
url = re.sub(r'stream[^.]*', r'stream' + str(i), url)
|
||||
|
||||
try:
|
||||
type, ext, size = url_info(url)
|
||||
break
|
||||
except:
|
||||
continue
|
||||
|
||||
print_info(site_info, title, type, size)
|
||||
if not info_only:
|
||||
download_urls([url], title, type, size, output_dir, merge = merge)
|
||||
|
||||
site_info = "Mixcloud.com"
|
||||
download = mixcloud_download
|
||||
download_playlist = playlist_not_supported('mixcloud')
|
@ -32,6 +32,7 @@ def url_to_module(url):
|
||||
'joy': joy,
|
||||
'kankanews': bilibili,
|
||||
'ku6': ku6,
|
||||
'mixcloud': mixcloud,
|
||||
'pptv': pptv,
|
||||
'qq': qq,
|
||||
'sina': sina,
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__version__ = '0.3dev-20130125'
|
||||
__date__ = '2013-01-25'
|
||||
__version__ = '0.3dev-20130201'
|
||||
__date__ = '2013-02-01'
|
||||
|
Loading…
Reference in New Issue
Block a user