Skip to content

Instantly share code, notes, and snippets.

@rexlManu
Created March 17, 2020 14:27
Show Gist options
  • Save rexlManu/e92a8dfe199c75de77e5bd226ad7e321 to your computer and use it in GitHub Desktop.
Save rexlManu/e92a8dfe199c75de77e5bd226ad7e321 to your computer and use it in GitHub Desktop.
Download workupload files via curl
if [ -z "$1" ] || [ -z "$2" ]
then
echo "workupload_download.sh <workupload id> <output file name>"
exit 1
fi
echo "Getting download url from workupload servers"
URL="$(curl -s "https://workupload.com/api/file/getDownloadServer/$1" | \python -c "import sys, json; print(json.load(sys.stdin)['data']['url'])")"
echo "Starting to download the actual file"
curl --silent $URL -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36 OPR/67.0.3575.53' -H 'Sec-Fetch-Dest: document' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' -H 'Sec-Fetch-Site: none' -H 'Sec-Fetch-Mode: navigate' -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' -H 'Cookie: token=tjuqjuuobv97ma180qn6vg92lu' --compressed --output $2
echo "Download finished. Have a happy day :)"
@shawnli87
Copy link

@rexlManu I forked your script and tweaked it a bit to automate the cookie process and make it a bit more user friendly. @Shivapriyan2001 @TheArcaneBrony https://gist.github.com/shawnli87/f226b4f0c7b2bef2e94477ccef00b0c8

@CyephireXD
Copy link

Hi I'm new with all this is there in anyway to include a tab or how to use.txt file not sure what I'm looking at.

@rexlManu
Copy link
Author

rexlManu commented Jun 1, 2023

I don't think that my script is still working.

@flopas10
Copy link

Not working after workupload is "checking for robots" now before opening site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment