mirror of
https://github.com/soimort/you-get.git
synced 2025-02-10 12:12:26 +03:00
commit
00dbc8dc75
@ -47,12 +47,17 @@ def googleplus_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
if real_url:
|
||||
break
|
||||
real_url = unicodize(real_url)
|
||||
|
||||
|
||||
type, ext, size = url_info(real_url)
|
||||
|
||||
if not ext:
|
||||
ext = 'mp4'
|
||||
|
||||
response = request.urlopen(request.Request(real_url))
|
||||
if response.headers['content-disposition']:
|
||||
filename = parse.unquote(r1(r'filename="?(.+)"?', response.headers['content-disposition'])).split('.')
|
||||
title = ''.join(filename[:-1])
|
||||
|
||||
print_info(site_info, title, ext, size)
|
||||
if not info_only:
|
||||
download_urls([real_url], title, ext, size, output_dir, merge = merge)
|
||||
|
@ -17,16 +17,6 @@ class YouGetTests(unittest.TestCase):
|
||||
"http://www.freesound.org/people/Corsica_S/sounds/184419/",
|
||||
])
|
||||
|
||||
def test_googleplus(self):
|
||||
test_urls([
|
||||
"http://plus.google.com/102663035987142737445/posts/jJRu43KQFT5",
|
||||
"http://plus.google.com/+%E5%B9%B3%E7%94%B0%E6%A2%A8%E5%A5%88/posts/jJRu43KQFT5",
|
||||
"http://plus.google.com/+平田梨奈/posts/jJRu43KQFT5",
|
||||
"http://plus.google.com/photos/102663035987142737445/albums/5844078581209509505/5844078587839097874",
|
||||
"http://plus.google.com/photos/+%E5%B9%B3%E7%94%B0%E6%A2%A8%E5%A5%88/albums/5844078581209509505/5844078587839097874",
|
||||
"http://plus.google.com/photos/+平田梨奈/albums/5844078581209509505/5844078587839097874",
|
||||
])
|
||||
|
||||
def test_jpopsuki(self):
|
||||
test_urls([
|
||||
"http://jpopsuki.tv/video/Dragon-Ash---Run-to-the-Sun/8ad7aec604badd0b0798cd999b63ae17",
|
||||
|
Loading…
Reference in New Issue
Block a user