Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
change: head instead of get
Browse files Browse the repository at this point in the history
  • Loading branch information
exander77 committed May 28, 2019
1 parent a189f52 commit 1f5ba78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ulozto_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ def sigint_handler(sig, frame):
result = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_url)

if url.startswith('{uri.scheme}://{uri.netloc}/file-tracking/'.format(uri=parsed_url)):
page = session.get(url, allow_redirects=False)
page = session.head(url, allow_redirects=False)
url = page.headers['Location']
if url.startswith('{uri.scheme}://{uri.netloc}/file-tracking/'.format(uri=parsed_url)):
page = session.get(url, allow_redirects=False)
page = session.head(url, allow_redirects=False)
url = page.headers['Location']

if password and username:
Expand Down

0 comments on commit 1f5ba78

Please sign in to comment.