mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 22:15:03 +03:00
Merge branch 'url_info' of https://github.com/rosynirvana/you-get into rosynirvana-url_info (close #1942)
This commit is contained in:
commit
7d6f68a159
@ -479,6 +479,9 @@ def url_locations(urls, faker = False, headers = {}):
|
|||||||
return locations
|
return locations
|
||||||
|
|
||||||
def url_save(url, filepath, bar, refer = None, is_part = False, faker = False, headers = {}, timeout = None, **kwargs):
|
def url_save(url, filepath, bar, refer = None, is_part = False, faker = False, headers = {}, timeout = None, **kwargs):
|
||||||
|
#When a referer specified with param refer, the key must be 'Referer' for the hack here
|
||||||
|
if refer is not None:
|
||||||
|
headers['Referer'] = refer
|
||||||
file_size = url_size(url, faker = faker, headers = headers)
|
file_size = url_size(url, faker = faker, headers = headers)
|
||||||
|
|
||||||
if os.path.exists(filepath):
|
if os.path.exists(filepath):
|
||||||
|
Loading…
Reference in New Issue
Block a user