[755] new site support

This commit is contained in:
Mort Yao 2015-09-21 00:24:22 +02:00
parent e8466ac290
commit b7814f6652
3 changed files with 24 additions and 0 deletions

View File

@ -996,6 +996,7 @@ def url_to_module(url):
miomio, miomio,
mixcloud, mixcloud,
mtv81, mtv81,
nanagogo,
netease, netease,
nicovideo, nicovideo,
pptv, pptv,
@ -1076,6 +1077,7 @@ def url_to_module(url):
'miomio': miomio, 'miomio': miomio,
'mixcloud': mixcloud, 'mixcloud': mixcloud,
'mtv81': mtv81, 'mtv81': mtv81,
'7gogo': nanagogo,
'nicovideo': nicovideo, 'nicovideo': nicovideo,
'pptv': pptv, 'pptv': pptv,
'qianmo':qianmo, 'qianmo':qianmo,

View File

@ -34,6 +34,7 @@ from .miaopai import *
from .miomio import * from .miomio import *
from .mixcloud import * from .mixcloud import *
from .mtv81 import * from .mtv81 import *
from .nanagogo import *
from .netease import * from .netease import *
from .nicovideo import * from .nicovideo import *
from .pptv import * from .pptv import *

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python
__all__ = ['nanagogo_download']
from ..common import *
def nanagogo_download(url, output_dir='.', merge=True, info_only=False):
html = get_html(url)
title = r1(r'<meta property="og:title" content="([^"]*)"', html)
postId = r1(r'postId\s*:\s*"([^"]*)"', html)
title += ' - ' + postId
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 = "7gogo.jp"
download = nanagogo_download
download_playlist = playlist_not_supported('nanagogo')