diff --git a/you_get/downloader/__init__.py b/you_get/downloader/__init__.py index a5010f1c..2f10057f 100644 --- a/you_get/downloader/__init__.py +++ b/you_get/downloader/__init__.py @@ -4,6 +4,7 @@ from .acfun import * from .bilibili import * from .cntv import * from .dailymotion import * +from .googleplus import * from .ifeng import * from .iqiyi import * from .ku6 import * diff --git a/you_get/downloader/googleplus.py b/you_get/downloader/googleplus.py new file mode 100644 index 00000000..7a0daff3 --- /dev/null +++ b/you_get/downloader/googleplus.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +__all__ = ['googleplus_download'] + +from ..common import * + +def googleplus_download(url, output_dir = '.', merge = True, info_only = False): + html = get_html(url) + html = parse.unquote(html).replace('\/', '/') + + title = r1(r'(.*)\n', html) + + url2 = r1(r'"(https\://plus\.google\.com/photos/.*?)",,"image/jpeg","video"\]', html) + html2 = get_html(url2) + html2 = parse.unquote(html2.replace('\/', '/')) + + real_url = r1(r',\"(http://redirector.googlevideo.com/.*)\"]', html2) + real_url = unicodize(real_url) + + 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 = "plus.google.com" +download = googleplus_download +download_playlist = playlist_not_supported('googleplus') diff --git a/you_get/main.py b/you_get/main.py index 659cfdec..409cdf6a 100644 --- a/you_get/main.py +++ b/you_get/main.py @@ -23,6 +23,7 @@ def url_to_module(url): 'bilibili': bilibili, 'cntv': cntv, 'dailymotion': dailymotion, + 'google': googleplus, 'iask': sina, 'ifeng': ifeng, 'iqiyi': iqiyi,