mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Miomio: add Sina as video source
This commit is contained in:
parent
8b5ae3a609
commit
bfc85f8a49
@ -4,6 +4,7 @@ __all__ = ['miomio_download']
|
|||||||
|
|
||||||
from ..common import *
|
from ..common import *
|
||||||
|
|
||||||
|
from .sina import sina_download_by_vid
|
||||||
from .tudou import tudou_download_by_id
|
from .tudou import tudou_download_by_id
|
||||||
from .youku import youku_download_by_id
|
from .youku import youku_download_by_id
|
||||||
|
|
||||||
@ -16,9 +17,11 @@ def miomio_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
t = r1(r'type=(\w+)', flashvars)
|
t = r1(r'type=(\w+)', flashvars)
|
||||||
id = r1(r'vid=([^"]+)', flashvars)
|
id = r1(r'vid=([^"]+)', flashvars)
|
||||||
if t == 'youku':
|
if t == 'youku':
|
||||||
youku_download_by_id(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
youku_download_by_id(id, title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
elif t == 'tudou':
|
elif t == 'tudou':
|
||||||
tudou_download_by_id(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
tudou_download_by_id(id, title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
|
elif t == 'sina':
|
||||||
|
sina_download_by_vid(id, title, output_dir=output_dir, merge=merge, info_only=info_only)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(flashvars)
|
raise NotImplementedError(flashvars)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user