mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
[archive] new site support
This commit is contained in:
parent
e075433563
commit
8985d57768
@ -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,
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
from .acfun import *
|
||||
from .alive import *
|
||||
from .archive import *
|
||||
from .baidu import *
|
||||
from .bilibili import *
|
||||
from .blip import *
|
||||
|
19
src/you_get/extractors/archive.py
Normal file
19
src/you_get/extractors/archive.py
Normal 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')
|
Loading…
x
Reference in New Issue
Block a user