mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
[embed] support embedded iqiyi patterns
This commit is contained in:
parent
ee06e3a516
commit
5b9ab46939
@ -2,6 +2,7 @@ __all__ = ['embed_download']
|
|||||||
|
|
||||||
from ..common import *
|
from ..common import *
|
||||||
|
|
||||||
|
from .iqiyi import iqiyi_download_by_vid
|
||||||
from .letv import letvcloud_download_by_vu
|
from .letv import letvcloud_download_by_vu
|
||||||
from .qq import qq_download_by_vid
|
from .qq import qq_download_by_vid
|
||||||
from .sina import sina_download_by_vid
|
from .sina import sina_download_by_vid
|
||||||
@ -33,6 +34,8 @@ tudou_api_patterns = [ ]
|
|||||||
|
|
||||||
yinyuetai_embed_patterns = [ 'player\.yinyuetai\.com/video/swf/(\d+)' ]
|
yinyuetai_embed_patterns = [ 'player\.yinyuetai\.com/video/swf/(\d+)' ]
|
||||||
|
|
||||||
|
iqiyi_embed_patterns = [ 'player\.video\.qiyi\.com/([^/]+)/[^/]+/[^/]+/[^/]+\.swf[^"]+tvId=(\d+)' ]
|
||||||
|
|
||||||
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)
|
content = get_content(url)
|
||||||
found = False
|
found = False
|
||||||
@ -52,6 +55,11 @@ def embed_download(url, output_dir = '.', merge = True, info_only = False ,**kwa
|
|||||||
found = True
|
found = True
|
||||||
yinyuetai_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
yinyuetai_download_by_id(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
|
|
||||||
|
vids = matchall(content, iqiyi_embed_patterns)
|
||||||
|
for vid in vids:
|
||||||
|
found = True
|
||||||
|
iqiyi_download_by_vid((vid[1], vid[0]), title=title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
raise NotImplementedError(url)
|
raise NotImplementedError(url)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user