mirror of
https://github.com/soimort/you-get.git
synced 2025-02-13 21:45:21 +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>
|
* 56 (56网) <http://www.56.com>
|
||||||
* Xiami (虾米) <http://www.xiami.com>
|
* Xiami (虾米) <http://www.xiami.com>
|
||||||
* Baidu (百度音乐) <http://music.baidu.com>
|
* Baidu (百度音乐) <http://music.baidu.com>
|
||||||
|
* SongTaste <http://www.songtaste.com>
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
@ -261,7 +262,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
|||||||
* 56网 <http://www.56.com>
|
* 56网 <http://www.56.com>
|
||||||
* 虾米 <http://www.xiami.com>
|
* 虾米 <http://www.xiami.com>
|
||||||
* 百度音乐 <http://music.baidu.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
|
* 56 (56网) http://www.56.com
|
||||||
* Xiami (虾米) http://www.xiami.com
|
* Xiami (虾米) http://www.xiami.com
|
||||||
* Baidu (百度音乐) http://music.baidu.com
|
* Baidu (百度音乐) http://music.baidu.com
|
||||||
|
* SongTaste http://www.songtaste.com
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
@ -21,6 +21,7 @@ def url_to_module(url):
|
|||||||
'163': netease,
|
'163': netease,
|
||||||
'56': w56,
|
'56': w56,
|
||||||
'acfun': acfun,
|
'acfun': acfun,
|
||||||
|
'baidu': baidu,
|
||||||
'bilibili': bilibili,
|
'bilibili': bilibili,
|
||||||
'blip': blip,
|
'blip': blip,
|
||||||
'cntv': cntv,
|
'cntv': cntv,
|
||||||
@ -45,6 +46,7 @@ def url_to_module(url):
|
|||||||
'sina': sina,
|
'sina': sina,
|
||||||
'smgbb': bilibili,
|
'smgbb': bilibili,
|
||||||
'sohu': sohu,
|
'sohu': sohu,
|
||||||
|
'songtaste':songtaste,
|
||||||
'soundcloud': soundcloud,
|
'soundcloud': soundcloud,
|
||||||
'tudou': tudou,
|
'tudou': tudou,
|
||||||
'tumblr': tumblr,
|
'tumblr': tumblr,
|
||||||
@ -52,7 +54,6 @@ def url_to_module(url):
|
|||||||
'vimeo': vimeo,
|
'vimeo': vimeo,
|
||||||
'vine': vine,
|
'vine': vine,
|
||||||
'xiami': xiami,
|
'xiami': xiami,
|
||||||
'baidu': baidu,
|
|
||||||
'yinyuetai': yinyuetai,
|
'yinyuetai': yinyuetai,
|
||||||
'youku': youku,
|
'youku': youku,
|
||||||
'youtu': youtube,
|
'youtu': youtube,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from .acfun import *
|
from .acfun import *
|
||||||
|
from .baidu import *
|
||||||
from .bilibili import *
|
from .bilibili import *
|
||||||
from .blip import *
|
from .blip import *
|
||||||
from .cntv import *
|
from .cntv import *
|
||||||
@ -23,6 +24,7 @@ from .pptv import *
|
|||||||
from .qq import *
|
from .qq import *
|
||||||
from .sina import *
|
from .sina import *
|
||||||
from .sohu import *
|
from .sohu import *
|
||||||
|
from .songtaste import *
|
||||||
from .soundcloud import *
|
from .soundcloud import *
|
||||||
from .tudou import *
|
from .tudou import *
|
||||||
from .tumblr import *
|
from .tumblr import *
|
||||||
@ -31,7 +33,6 @@ from .vimeo import *
|
|||||||
from .vine import *
|
from .vine import *
|
||||||
from .w56 import *
|
from .w56 import *
|
||||||
from .xiami import *
|
from .xiami import *
|
||||||
from .baidu import *
|
|
||||||
from .yinyuetai import *
|
from .yinyuetai import *
|
||||||
from .youku import *
|
from .youku import *
|
||||||
from .youtube 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:
|
if not info_only:
|
||||||
print('Downloading %s ...' % (title + '.cmt.json'))
|
print('Downloading %s ...' % (title + '.cmt.json'))
|
||||||
cmt = get_srt_json(vid)
|
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)
|
x.write(cmt)
|
||||||
|
|
||||||
def acfun_download(url, output_dir = '.', merge = True, info_only = False):
|
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):
|
def bilibili_download_by_cid(id, title, output_dir = '.', merge = True, info_only = False):
|
||||||
url = 'http://interface.bilibili.tv/playurl?cid=' + id
|
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]):
|
if re.search(r'\.(flv|hlv)\b', urls[0]):
|
||||||
type = 'flv'
|
type = 'flv'
|
||||||
@ -101,7 +101,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
if not info_only:
|
if not info_only:
|
||||||
print('Downloading %s ...' % (title + '.cmt.xml'))
|
print('Downloading %s ...' % (title + '.cmt.xml'))
|
||||||
xml = get_srt_xml(id)
|
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)
|
x.write(xml)
|
||||||
|
|
||||||
site_info = "bilibili.tv"
|
site_info = "bilibili.tv"
|
||||||
|
@ -4,8 +4,8 @@ __all__ = ['songtaste_download']
|
|||||||
|
|
||||||
from ..common import *
|
from ..common import *
|
||||||
import urllib.error
|
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):
|
if re.match(r'http://www.songtaste.com/song/\d+', url):
|
||||||
old_fake_headers = fake_headers
|
old_fake_headers = fake_headers
|
||||||
id = r1(r'http://www.songtaste.com/song/(\d+)', url)
|
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)
|
download_urls([real_url], title, ext, size, output_dir, refer = url, merge = merge, faker = True)
|
||||||
fake_hreaders = old_fake_headers
|
fake_hreaders = old_fake_headers
|
||||||
|
|
||||||
|
site_info = "SongTaste.com"
|
||||||
site_info = "www.songtaste.com"
|
|
||||||
download = songtaste_download
|
download = songtaste_download
|
||||||
download_playlist = playlist_not_supported('songtaste')
|
download_playlist = playlist_not_supported('songtaste')
|
||||||
|
Loading…
Reference in New Issue
Block a user