Skip to content

Instantly share code, notes, and snippets.

@zuloo
Created September 25, 2017 22:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuloo/2ca8b13a429568704796a3cd09899f24 to your computer and use it in GitHub Desktop.
Save zuloo/2ca8b13a429568704796a3cd09899f24 to your computer and use it in GitHub Desktop.
Download all files from a humble bundle order
# Download the bundle.json by watching for a XHR request in your browsers console that contains the bundle data
# The request to watch for has a 16 byte random file name and a complex json sturcture:
#{
# "amount_spent":1000.0,
# "product":{
# "category":"bundle",
# "machine_name":"foo",
# "post_purchase_text":"",
# "supports_canonical":false,
# "human_name":"foo bar",
# "automated_empty_tpkds":{},
# "partial_gift_enabled":true
# },
# "gamekey":"XXXXXXXXXXXXXXXX",
# "uid":"XXXXXXXXXXX",
# "created":"2017-01-01T00:00:00.999999",
# "missed_credit":null,
# "subproducts":[
#
# save the request response to bundle.json
cat bundle.json | jq '..|.web?' -r | grep -v null | while read line; do wget -O ${${line%%\?*}##*/} $line; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment