Skip to content

Commit

Permalink
Fix download for go.wetransfer.com links
Browse files Browse the repository at this point in the history
wetransfer now (sometimes) returns short url form in https://go.wetransfer.com/ instead of https://we.tl/
  • Loading branch information
sharevb committed Nov 4, 2023
1 parent 7112c1f commit 79f443a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion transferwee.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def download_url(url: str) -> Optional[str]:
"""
logger.debug(f"Getting download URL of {url}")
# Follow the redirect if we have a short URL
if url.startswith("https://we.tl/"):
if url.startswith("https://we.tl/") or url.startswith(
"https://go.wetransfer.com/"
):
r = requests.head(
url,
allow_redirects=True,
Expand Down

0 comments on commit 79f443a

Please sign in to comment.