mirror of
https://github.com/soimort/you-get.git
synced 2025-02-10 12:12:26 +03:00
support v.qq.com embed video
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
This commit is contained in:
parent
7bdf8af620
commit
a99f094c3e
@ -21,7 +21,7 @@ youku_embed_patterns = [ 'youku\.com/v_show/id_([a-zA-Z0-9=]+)',
|
||||
"""
|
||||
http://www.tudou.com/programs/view/html5embed.action?type=0&code=3LS_URGvl54&lcode=&resourceId=0_06_05_99
|
||||
"""
|
||||
tudou_embed_patterns = [ 'tudou\.com[a-zA-Z0-9\/\?=\&\.\;]+code=([[a-zA-Z0-9_]+)\&'
|
||||
tudou_embed_patterns = [ 'tudou\.com[a-zA-Z0-9\/\?=\&\.\;]+code=([a-zA-Z0-9_]+)\&'
|
||||
]
|
||||
|
||||
"""
|
||||
@ -29,6 +29,22 @@ refer to http://open.tudou.com/wiki/video/info
|
||||
"""
|
||||
tudou_api_patterns = [ ]
|
||||
|
||||
|
||||
"""
|
||||
v.qq.com
|
||||
"""
|
||||
qq_embed_patterns = [ 'v\.qq\.com[a-zA-Z0-9\/\?\.\;]+vid=([a-zA-Z0-9]+)',
|
||||
'v\.qq\.com[a-zA-Z0-9\/\?\.\;]+\/([a-zA-Z0-9]+)\.html',
|
||||
'TPout\.swf\?\&vid=([a-zA-Z0-9]+)'
|
||||
]
|
||||
|
||||
|
||||
"""
|
||||
tv.sohu.com
|
||||
"""
|
||||
sohu_embed_patterns = [ 'tv\.sohu\.com[a-zA-Z0-9\/\?=]+\&vid=([a-zA-Z0-9]+)\&'
|
||||
]
|
||||
|
||||
def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwargs):
|
||||
content = get_content(url)
|
||||
found = False
|
||||
@ -43,6 +59,11 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwa
|
||||
found = True
|
||||
tudou_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||
|
||||
vids = matchall(content, qq_embed_patterns)
|
||||
for vid in vids:
|
||||
found = True
|
||||
qq_download_by_vid(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||
|
||||
if not found:
|
||||
raise NotImplementedError(url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user