Download from WeTransfer to a Linux server using Wget

Colleagues sometimes send files via WeTransfer that need to go on a remote server. WeTransfer makes it difficult to do that directly; the download button exposed on their landing pages redirect to the real download location using JavaScript in the browser. That link obfuscation makes downloading via Wget or similar simple tools difficult. Here is the solution I have adopted (from Stackoverflow):

Start WeTransfer download

First start the download in Firefox.

Cancel WeTransfer download

Cancel the download…

Copy WeTransfer download link

…then right click on the download in the popup download manager and select Copy Download Link.

That link can then be used in Wget along with the Mozilla browser user agent flag to keep WeTransfer happy. -O helps by writing a decent file name:

wget --user-agent Mozilla/4.0 'https://wetransfer-your-download-link' -O destination-file-name

Keep in mind that the full download links expire quickly.

Download from WeTransfer using wget

On Dropbox, the process is less complicated; for their files, you only need the link as sent to you (it contains the file name). Add ?dl=1 to the end of that link then download as above with WeTransfer.

Google Drive is possibly the least convenient file storage service to use from a Linux server perspective; to download from them, a Google account is required, as well as the Gdrive utility (or something similar).