You can manually download the following link:
http://saved-games-alpha.s3-website-us-east-1.amazonaws.com/Jghre-0gMk@.json.gz
It's a gzip file. Unzipping it yields a file called "temp" that has the JSON data I want in it.
I need a greasemonkey script to automate this. When I run
const gzip = jQuery.get("http://saved-games-alpha.s3-website-us-east-1.amazonaws.com/Jghre-0gMk@.json.gz");
I get a successful response, but I don't know what to do with it to get the JSON.
console.log(gzip); // the response object
console.log(gzip.responseText); // undefined, but I can see it in the inspector as binary
I am trying to use the gunzip library here to get at the JSON, but the Firefox console just shows nothing after I call
const json_data = JXG.decompress(gzip.responseText);
How do I access the JSON data?
Important code:
const uri = "http://saved-games-alpha.s3-website-us-east-1.amazonaws.com/Jghre-0gMk@.json.gz";
console.log(uri);
const gzip = jQuery.get(uri);
console.log("gzip got");
console.log(gzip);
console.log(gzip.responseText);
console.log(JXG);
const json_data = JXG.decompress(gzip.responseText);
console.log("JSON: " + json_data); // doesn't appear in console
Console output: see https://i.stack.imgur.com/AjCmI.png