Merge branch '755' into develop

This commit is contained in:
Mort Yao 2015-09-21 00:34:31 +02:00
commit e1fc6be9c4
3 changed files with 24 additions and 0 deletions

View File

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

View File

@ -34,6 +34,7 @@ from .miaopai import *
from .miomio import *
from .mixcloud import *
from .mtv81 import *
from .nanagogo import *
from .netease import *
from .nicovideo 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')