[archive] new site support

This commit is contained in:
Mort Yao 2015-09-21 10:28:59 +02:00
parent e075433563
commit 8985d57768
3 changed files with 22 additions and 0 deletions

View File

@ -961,6 +961,7 @@ def url_to_module(url):
from .extractors import (
acfun,
alive,
archive,
baidu,
baomihua,
bilibili,
@ -1040,6 +1041,7 @@ def url_to_module(url):
'163': netease,
'56': w56,
'acfun': acfun,
'archive': archive,
'baidu': baidu,
'baomihua': baomihua,
'bilibili': bilibili,

View File

@ -2,6 +2,7 @@
from .acfun import *
from .alive import *
from .archive import *
from .baidu import *
from .bilibili import *
from .blip import *

View File

@ -0,0 +1,19 @@
#!/usr/bin/env python
__all__ = ['archive_download']
from ..common import *
def archive_download(url, output_dir='.', merge=True, info_only=False):
html = get_html(url)
title = r1(r'<meta property="og:title" content="([^"]*)"', html)
source = r1(r'<meta property="og:video" content="([^"]*)"', html)
mime, ext, size = url_info(source)
print_info(site_info, title, mime, size)
if not info_only:
download_urls([source], title, ext, size, output_dir, merge=merge)
site_info = "Archive.org"
download = archive_download
download_playlist = playlist_not_supported('archive')