Miomio: add Sina as video source

This commit is contained in:
Mort Yao 2013-10-18 23:03:56 +02:00
parent 8b5ae3a609
commit bfc85f8a49

View File

@ -4,6 +4,7 @@ __all__ = ['miomio_download']
from ..common import *
from .sina import sina_download_by_vid
from .tudou import tudou_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)
id = r1(r'vid=([^"]+)', flashvars)
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':
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:
raise NotImplementedError(flashvars)