Skip to content

Instantly share code, notes, and snippets.

@dardo82
Created September 16, 2022 02:01
Show Gist options
  • Save dardo82/74004722496a89eea46283cb68351858 to your computer and use it in GitHub Desktop.
Save dardo82/74004722496a89eea46283cb68351858 to your computer and use it in GitHub Desktop.
Rogue Bunnies DownLoader
#!/bin/zsh
# Rogue Bunnies Trading Cards DownLoader
URL="https://tradingcards.roguebunnies.com"
API="https://api.gigantik.io\
/marketplace/tokens/[1738371-1775895]"
PT='function glpf4() {getline; print $4}; \
/"type/{glpf4(); glpf4()}'
RBTC=$(curl -H origin:$URL $API \
| awk -v RS=, -v FS=\" $PT \
| paste -d" \n" -s - | sort -u)
for LINE in "${(f)RBTC}"; do
IPFS="$IPFS https:${LINE#*:}"
MV="$MV mv -v ${LINE##*/} \
${${LINE/ https:*/.mp4}// /_};"
done
curl --remote-name-all ${=IPFS}; sh -c "$MV"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment