mirror of
https://github.com/soimort/you-get.git
synced 2025-02-02 16:24:00 +03:00
more embed videos
This commit is contained in:
parent
712cc69218
commit
b8d4b6b80c
@ -42,6 +42,14 @@ netease_embed_patterns = [ '(http://\w+\.163\.com/movie/[^\'"]+)' ]
|
|||||||
|
|
||||||
vimeo_embed_patters = [ 'player\.vimeo\.com/video/(\d+)' ]
|
vimeo_embed_patters = [ 'player\.vimeo\.com/video/(\d+)' ]
|
||||||
|
|
||||||
|
qq_embed_patterns = [ 'v\.qq\.com/iframe/player.html\?vid=([0-9a-zA-Z]+)' ]
|
||||||
|
|
||||||
|
"""
|
||||||
|
refer to http://help.lecloud.com/Wiki.jsp?page=PC4.0
|
||||||
|
"""
|
||||||
|
letv_embed_patterns = [ 'http://yuntv.letv.com/player/vod/bcloud.js',
|
||||||
|
'http://yuntv.letv.com/bcloud.js' ]
|
||||||
|
|
||||||
|
|
||||||
def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwargs):
|
def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwargs):
|
||||||
content = get_content(url, headers=fake_headers)
|
content = get_content(url, headers=fake_headers)
|
||||||
@ -68,6 +76,17 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwa
|
|||||||
found = True
|
found = True
|
||||||
iqiyi_download_by_vid((vid[1], vid[0]), title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
iqiyi_download_by_vid((vid[1], vid[0]), 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 len(matchall(content,letv_embed_patterns)):
|
||||||
|
found = True
|
||||||
|
uu=match1(content,r'uu[:+="]*([0-9a-zA-Z]+)')
|
||||||
|
vu=match1(content,r'vu[:+="]*([0-9a-zA-Z]+)')
|
||||||
|
letvcloud_download_by_vu(vu, uu, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
|
|
||||||
urls = matchall(content, netease_embed_patterns)
|
urls = matchall(content, netease_embed_patterns)
|
||||||
for url in urls:
|
for url in urls:
|
||||||
found = True
|
found = True
|
||||||
|
Loading…
Reference in New Issue
Block a user