mirror of
https://github.com/soimort/you-get.git
synced 2025-02-13 13:35:20 +03:00
merge
This commit is contained in:
commit
9c464cb75f
@ -47,6 +47,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
||||
* 56 (56网) <http://www.56.com>
|
||||
* Xiami (虾米) <http://www.xiami.com>
|
||||
* Baidu (百度音乐) <http://music.baidu.com>
|
||||
* SongTaste <http://www.songtaste.com>
|
||||
|
||||
## Dependencies
|
||||
|
||||
@ -261,7 +262,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
||||
* 56网 <http://www.56.com>
|
||||
* 虾米 <http://www.xiami.com>
|
||||
* 百度音乐 <http://music.baidu.com>
|
||||
|
||||
* SongTaste <http://www.songtaste.com>
|
||||
|
||||
## 依赖
|
||||
|
||||
|
@ -50,6 +50,7 @@ Supported Sites (As of Now)
|
||||
* 56 (56网) http://www.56.com
|
||||
* Xiami (虾米) http://www.xiami.com
|
||||
* Baidu (百度音乐) http://music.baidu.com
|
||||
* SongTaste http://www.songtaste.com
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
@ -21,6 +21,7 @@ def url_to_module(url):
|
||||
'163': netease,
|
||||
'56': w56,
|
||||
'acfun': acfun,
|
||||
'baidu': baidu,
|
||||
'bilibili': bilibili,
|
||||
'blip': blip,
|
||||
'cntv': cntv,
|
||||
@ -45,6 +46,7 @@ def url_to_module(url):
|
||||
'sina': sina,
|
||||
'smgbb': bilibili,
|
||||
'sohu': sohu,
|
||||
'songtaste':songtaste,
|
||||
'soundcloud': soundcloud,
|
||||
'tudou': tudou,
|
||||
'tumblr': tumblr,
|
||||
@ -52,7 +54,6 @@ def url_to_module(url):
|
||||
'vimeo': vimeo,
|
||||
'vine': vine,
|
||||
'xiami': xiami,
|
||||
'baidu': baidu,
|
||||
'yinyuetai': yinyuetai,
|
||||
'youku': youku,
|
||||
'youtu': youtube,
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from .acfun import *
|
||||
from .baidu import *
|
||||
from .bilibili import *
|
||||
from .blip import *
|
||||
from .cntv import *
|
||||
@ -23,6 +24,7 @@ from .pptv import *
|
||||
from .qq import *
|
||||
from .sina import *
|
||||
from .sohu import *
|
||||
from .songtaste import *
|
||||
from .soundcloud import *
|
||||
from .tudou import *
|
||||
from .tumblr import *
|
||||
@ -31,7 +33,6 @@ from .vimeo import *
|
||||
from .vine import *
|
||||
from .w56 import *
|
||||
from .xiami import *
|
||||
from .baidu import *
|
||||
from .yinyuetai import *
|
||||
from .youku import *
|
||||
from .youtube import *
|
||||
|
@ -33,7 +33,7 @@ def acfun_download_by_id(id, title = None, output_dir = '.', merge = True, info_
|
||||
if not info_only:
|
||||
print('Downloading %s ...' % (title + '.cmt.json'))
|
||||
cmt = get_srt_json(vid)
|
||||
with open(title + '.cmt.json', 'w') as x:
|
||||
with open(os.path.join(output_dir, title + '.cmt.json'), 'w') as x:
|
||||
x.write(cmt)
|
||||
|
||||
def acfun_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
|
@ -55,7 +55,7 @@ def parse_cid_playurl(xml):
|
||||
|
||||
def bilibili_download_by_cid(id, title, output_dir = '.', merge = True, info_only = False):
|
||||
url = 'http://interface.bilibili.tv/playurl?cid=' + id
|
||||
urls = parse_cid_playurl(get_html(url, 'utf-8'))
|
||||
urls = [i if not re.match(r'.*\.qqvideo\.tc\.qq\.com', i) else re.sub(r'.*\.qqvideo\.tc\.qq\.com', 'http://vsrc.store.qq.com', i) for i in parse_cid_playurl(get_html(url, 'utf-8'))] # dirty fix for QQ
|
||||
|
||||
if re.search(r'\.(flv|hlv)\b', urls[0]):
|
||||
type = 'flv'
|
||||
@ -101,7 +101,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
if not info_only:
|
||||
print('Downloading %s ...' % (title + '.cmt.xml'))
|
||||
xml = get_srt_xml(id)
|
||||
with open(title + '.cmt.xml', 'w') as x:
|
||||
with open(os.path.join(output_dir, title + '.cmt.xml'), 'w') as x:
|
||||
x.write(xml)
|
||||
|
||||
site_info = "bilibili.tv"
|
||||
|
@ -4,8 +4,8 @@ __all__ = ['songtaste_download']
|
||||
|
||||
from ..common import *
|
||||
import urllib.error
|
||||
def songtaste_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
|
||||
def songtaste_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
if re.match(r'http://www.songtaste.com/song/\d+', url):
|
||||
old_fake_headers = fake_headers
|
||||
id = r1(r'http://www.songtaste.com/song/(\d+)', url)
|
||||
@ -38,7 +38,6 @@ def songtaste_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
download_urls([real_url], title, ext, size, output_dir, refer = url, merge = merge, faker = True)
|
||||
fake_hreaders = old_fake_headers
|
||||
|
||||
|
||||
site_info = "www.songtaste.com"
|
||||
site_info = "SongTaste.com"
|
||||
download = songtaste_download
|
||||
download_playlist = playlist_not_supported('songtaste')
|
||||
|
Loading…
Reference in New Issue
Block a user