Created
March 17, 2020 14:27
-
-
Save rexlManu/e92a8dfe199c75de77e5bd226ad7e321 to your computer and use it in GitHub Desktop.
Download workupload files via curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 :)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not working after workupload is "checking for robots" now before opening site.