mirror of
https://github.com/soimort/you-get.git
synced 2025-02-02 16:24:00 +03:00
add support for Google+
This commit is contained in:
parent
7ff89d01d2
commit
1c46a955a0
@ -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 *
|
||||
|
28
you_get/downloader/googleplus.py
Normal file
28
you_get/downloader/googleplus.py
Normal file
@ -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'<title>(.*)\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')
|
@ -23,6 +23,7 @@ def url_to_module(url):
|
||||
'bilibili': bilibili,
|
||||
'cntv': cntv,
|
||||
'dailymotion': dailymotion,
|
||||
'google': googleplus,
|
||||
'iask': sina,
|
||||
'ifeng': ifeng,
|
||||
'iqiyi': iqiyi,
|
||||
|
Loading…
Reference in New Issue
Block a user