mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
Google+: use Content-Disposition filename
This commit is contained in:
parent
226c7adaaf
commit
04670164d5
@ -53,6 +53,11 @@ def googleplus_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
if not ext:
|
if not ext:
|
||||||
ext = 'mp4'
|
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)
|
print_info(site_info, title, ext, size)
|
||||||
if not info_only:
|
if not info_only:
|
||||||
download_urls([real_url], title, ext, size, output_dir, merge = merge)
|
download_urls([real_url], title, ext, size, output_dir, merge = merge)
|
||||||
|
Loading…
Reference in New Issue
Block a user