mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
Google+: use Content-Disposition filename
This commit is contained in:
parent
226c7adaaf
commit
04670164d5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user