Skip to content

Commit

Permalink
Merge branch 'url_info' of https://github.com/rosynirvana/you-get int…
Browse files Browse the repository at this point in the history
…o rosynirvana-url_info (close #1942)
  • Loading branch information
soimort committed May 6, 2017
2 parents 9d39517 + 8f828a9 commit 7d6f68a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/you_get/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ def url_locations(urls, faker = False, headers = {}):
return locations

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)

if os.path.exists(filepath):
Expand Down

0 comments on commit 7d6f68a

Please sign in to comment.