Created
April 29, 2017 08:47
-
-
Save BirkhoffLee/39b6ae5d9d97331a7b88105f5c2ee347 to your computer and use it in GitHub Desktop.
Dump all data of minecraft-ids.grahamedgecombe.com as JSON
This file contains hidden or 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
items={} | |
$("table.items tr").each((i, tr) => { | |
item = {} | |
item.id = $("td.id", tr).html() | |
item.name = $("span.text-id", tr).html().slice(11).slice(0, -1).toUpperCase() | |
item.data = (item.id.indexOf(":") != null) ? item.id.split(":")[1] : ""; | |
item.displayname = $("td.row-desc > span", tr).html() | |
items[item.id]=item | |
}) | |
console.log(JSON.stringify(items)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment