See also @shawnli87's fork and their zsh version.
Last active
October 27, 2024 18:24
-
-
Save MCOfficer/d1000c2b70311bcc4e246375a3b18e77 to your computer and use it in GitHub Desktop.
Bash script to download files from gofile.io
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
#!/bin/bash | |
id=`sed -E 's/.*gofile.io\/d\/(\w*?)/\1/' <<< $1` | |
echo "Downloading $id" | |
server=`curl -s https://apiv2.gofile.io/getServer?c=$id | jq -r '.data.server'` | |
files=`curl -s https://$server.gofile.io/getUpload?c=$id | jq '.data.files'` | |
for key in `jq 'keys | .[]' <<< $files`; do | |
file=`jq ".[$key]" <<< $files` | |
url=`jq -r '.link' <<< $file` | |
name=`jq -r '.name' <<< $file` | |
echo | |
echo "Downloading $name" | |
curl $url -o "$name" | |
done | |
echo | |
echo | |
echo "Note: gofile.io is entirely free with no ads," | |
echo "you can support it at https://gofile.io/donate" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this out https://gist.github.com/shawnli87/f226b4f0c7b2bef2e94477ccef00b0c8