mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[yinyuetai] purge (#2855)
This commit is contained in:
parent
348455c990
commit
4f8c73e9ac
@ -117,7 +117,6 @@ SITES = {
|
|||||||
'xiaojiadianvideo' : 'fc2video',
|
'xiaojiadianvideo' : 'fc2video',
|
||||||
'ximalaya' : 'ximalaya',
|
'ximalaya' : 'ximalaya',
|
||||||
'xinpianchang' : 'xinpianchang',
|
'xinpianchang' : 'xinpianchang',
|
||||||
'yinyuetai' : 'yinyuetai',
|
|
||||||
'yizhibo' : 'yizhibo',
|
'yizhibo' : 'yizhibo',
|
||||||
'youku' : 'youku',
|
'youku' : 'youku',
|
||||||
'youtu' : 'youtube',
|
'youtu' : 'youtube',
|
||||||
|
@ -80,7 +80,6 @@ from .w56 import *
|
|||||||
from .wanmen import *
|
from .wanmen import *
|
||||||
from .xiami import *
|
from .xiami import *
|
||||||
from .xinpianchang import *
|
from .xinpianchang import *
|
||||||
from .yinyuetai import *
|
|
||||||
from .yixia import *
|
from .yixia import *
|
||||||
from .youku import *
|
from .youku import *
|
||||||
from .youtube import *
|
from .youtube import *
|
||||||
|
@ -13,7 +13,6 @@ from .qq import qq_download_by_vid
|
|||||||
from .sina import sina_download_by_vid
|
from .sina import sina_download_by_vid
|
||||||
from .tudou import tudou_download_by_id
|
from .tudou import tudou_download_by_id
|
||||||
from .vimeo import vimeo_download_by_id
|
from .vimeo import vimeo_download_by_id
|
||||||
from .yinyuetai import yinyuetai_download_by_id
|
|
||||||
from .youku import youku_download_by_vid
|
from .youku import youku_download_by_vid
|
||||||
from . import iqiyi
|
from . import iqiyi
|
||||||
from . import bokecc
|
from . import bokecc
|
||||||
@ -40,8 +39,6 @@ refer to http://open.tudou.com/wiki/video/info
|
|||||||
"""
|
"""
|
||||||
tudou_api_patterns = [ ]
|
tudou_api_patterns = [ ]
|
||||||
|
|
||||||
yinyuetai_embed_patterns = [ 'player\.yinyuetai\.com/video/swf/(\d+)' ]
|
|
||||||
|
|
||||||
iqiyi_embed_patterns = [ 'player\.video\.qiyi\.com/([^/]+)/[^/]+/[^/]+/[^/]+\.swf[^"]+tvId=(\d+)' ]
|
iqiyi_embed_patterns = [ 'player\.video\.qiyi\.com/([^/]+)/[^/]+/[^/]+/[^/]+\.swf[^"]+tvId=(\d+)' ]
|
||||||
|
|
||||||
netease_embed_patterns = [ '(http://\w+\.163\.com/movie/[^\'"]+)' ]
|
netease_embed_patterns = [ '(http://\w+\.163\.com/movie/[^\'"]+)' ]
|
||||||
@ -82,11 +79,6 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False, **kwa
|
|||||||
found = True
|
found = True
|
||||||
tudou_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only, **kwargs)
|
tudou_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only, **kwargs)
|
||||||
|
|
||||||
vids = matchall(content, yinyuetai_embed_patterns)
|
|
||||||
for vid in vids:
|
|
||||||
found = True
|
|
||||||
yinyuetai_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only, **kwargs)
|
|
||||||
|
|
||||||
vids = matchall(content, iqiyi_embed_patterns)
|
vids = matchall(content, iqiyi_embed_patterns)
|
||||||
for vid in vids:
|
for vid in vids:
|
||||||
found = True
|
found = True
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
__all__ = ['yinyuetai_download', 'yinyuetai_download_by_id']
|
|
||||||
|
|
||||||
from ..common import *
|
|
||||||
|
|
||||||
def yinyuetai_download_by_id(vid, title=None, output_dir='.', merge=True, info_only=False):
|
|
||||||
video_info = json.loads(get_html('http://www.yinyuetai.com/insite/get-video-info?json=true&videoId=%s' % vid))
|
|
||||||
url_models = video_info['videoInfo']['coreVideoInfo']['videoUrlModels']
|
|
||||||
url_models = sorted(url_models, key=lambda i: i['qualityLevel'])
|
|
||||||
url = url_models[-1]['videoUrl']
|
|
||||||
type = ext = r1(r'\.(flv|mp4)', url)
|
|
||||||
_, _, size = url_info(url)
|
|
||||||
|
|
||||||
print_info(site_info, title, type, size)
|
|
||||||
if not info_only:
|
|
||||||
download_urls([url], title, ext, size, output_dir, merge = merge)
|
|
||||||
|
|
||||||
def yinyuetai_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|
||||||
id = r1(r'http://\w+.yinyuetai.com/video/(\d+)', url) or \
|
|
||||||
r1(r'http://\w+.yinyuetai.com/video/h5/(\d+)', url)
|
|
||||||
if not id:
|
|
||||||
yinyuetai_download_playlist(url, output_dir=output_dir, merge=merge, info_only=info_only)
|
|
||||||
return
|
|
||||||
|
|
||||||
html = get_html(url, 'utf-8')
|
|
||||||
title = r1(r'<meta property="og:title"\s+content="([^"]+)"/>', html) or r1(r'<title>(.*)', html)
|
|
||||||
assert title
|
|
||||||
title = parse.unquote(title)
|
|
||||||
title = escape_file_path(title)
|
|
||||||
yinyuetai_download_by_id(id, title, output_dir, merge=merge, info_only=info_only)
|
|
||||||
|
|
||||||
def yinyuetai_download_playlist(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
|
||||||
playlist = r1(r'http://\w+.yinyuetai.com/playlist/(\d+)', url)
|
|
||||||
html = get_html(url)
|
|
||||||
data_ids = re.findall(r'data-index="\d+"\s*data-id=(\d+)', html)
|
|
||||||
for data_id in data_ids:
|
|
||||||
yinyuetai_download('http://v.yinyuetai.com/video/' + data_id,
|
|
||||||
output_dir=output_dir, merge=merge, info_only=info_only)
|
|
||||||
|
|
||||||
site_info = "YinYueTai.com"
|
|
||||||
download = yinyuetai_download
|
|
||||||
download_playlist = yinyuetai_download_playlist
|
|
Loading…
Reference in New Issue
Block a user