download files via terminal/cmdline through wetransfer.com
WgetWget Problem Overview
poeple more and more send me big zip files via wetransfer, which is fine as it works and i don't need to setup a ftp or upload myself. but i need to get this data to my ubuntu server that sits on a fast connection in a serverfarm.
i tried to wget the link that wetransfer sends by mail, but i only get the html info page that shows up before wetransfer sends the file through http
i tried a txt-browser (lynx, elinks) but wetrasnfer keeps on mumbling about "outdated browser" and it somehow does not work
i end up downloading to my laptop and uploading through throttled DSL to the server which takes all night...
does anyone had success with downloading wetransfer links from linux terminal?
thnx mart
Wget Solutions
Solution 1 - Wget
- First, obtain the real download link.
- Using your browser (I'm using Firefox) click "Download Link" on WeTransfer's download page.
- After the download begins, right-click on the file being downloaded and select "Copy Download Link".
- Find out your browser's User Agent. You can use whatsmyuseragent.com to grab it.
- Prepare your wget command and download the file.
Example:
wget --user-agent Mozilla/4.0 '[your big address here]' -O dest_file_name
Don't forget the quotes.
[your big address here] must be the direct link to the file, not the forwarded html page. You can get the big address by starting the download on any machine, then copy the link from your download-manager (eg. firefox, chrome)
Solution 2 - Wget
I couldn't get it working with wget so here's an alternative using curl:
curl '{pretty_long_appendix_here}' --location --output {file_name_on_my_disk}
replace
> {pretty_long_appendix_here}
with the actual download url [starting with https://download.wetransfer.com/] you get when you actually start the download.
In chrome for example start the download and go to
> Window > Downloads
Stop the running download and copy the download-URL by right-clicking on it.
Replace
> {file_name_on_my_disk}
with the actual name you want the file to be stored on your disk.
Solution 3 - Wget
Alejandro Alonso wrote a Python script py-wetransfer for downloading wetransfer files in command line mode.
With a we transfer address similar to https://www.wetransfer.com/downloads/XXXX/YYYY/ZZZZ you can execute this command to download the file:
python wetransfer.py -u https://www.wetransfer.com/downloads/XXXX/YYYY/ZZZZ
It requires Python and Requests.
Solution 4 - Wget
WeTransfer does offer an option to upload/download files via terminal
[ Source : https://wetransfer.com/products ]
You've to download WTClient from here available for Win, Mac and Linux.
Even though it has useful options like 'debug mode'
downloading is only possible with a Plus account.
bummer!
ReadMe
Solution 5 - Wget
Solution working in October 2021. Just wget and a browser are required:
-
access your wetransfer link in any modern browser (https://wetransfer.com/downloads/<>;)
-
open the developer console / panel and head to the network tab
- set the network speed to 3G (in chrome, or the lowest one on your browser)*
-
click download
-
in the network tab, find the request that was created right after clicking download and inspect it
- On the request preview, copy the
direct_link
content
-
Now just do
wget -o myfile 'your direct link'
-
You can be nice enough to cancel the download that's still going on your browser so you don't consume that much bandwidth from wetransfer
*You should lower your tab speed because every direct_link
has a token attached to it. This token expires once the download is complete. So you want to make sure the download on your browser will take longer than the one on your terminal.
Solution 6 - Wget
I've forked and updated Marcos' fork of Alejandro Alonso's py-wetransfer script.
It's now able to work on Python 2.x or 3.x, and it can handle the shortened links. You can find it here: https://github.com/GaryWatsonUK/py-wetransfer/blob/master/wetransfer.py
(Thanks for sharing your work, guys! I learned a lot from it.)
Solution 7 - Wget
If you don't have terminal access, here's a PHP script that can download WeTransfer links.
I've used it to save time when having to download files to my computer, and then upload them to a server.