提交 19a8c079 编写于 作者: M Mort Yao

add support for Dailymotion

上级 043573c8
......@@ -3,6 +3,7 @@
from .acfun import *
from .bilibili import *
from .cntv import *
from .dailymotion import *
from .ifeng import *
from .iqiyi import *
from .ku6 import *
......
#!/usr/bin/env python
__all__ = ['dailymotion_download']
from ..common import *
def dailymotion_download(url, output_dir = '.', merge = True, info_only = False):
html = get_html(url)
html = parse.unquote(html).replace('\/', '/')
title = r1(r'meta property="og:title" content="([^"]+)"', html)
title = escape_file_path(title)
real_url = r1(r',\"sdURL\"\:\"([^\"]+?)\",', html)
type, ext, size = url_info(real_url)
print_info(site_info, title, type, size)
if not info_only:
download_urls([real_url], title, ext, size, output_dir, merge = merge)
site_info = "Dailymotion.com"
download = dailymotion_download
download_playlist = playlist_not_supported('dailymotion')
......@@ -22,6 +22,7 @@ def url_to_module(url):
'acfun': acfun,
'bilibili': bilibili,
'cntv': cntv,
'dailymotion': dailymotion,
'iask': sina,
'ifeng': ifeng,
'iqiyi': iqiyi,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册