Skip to content

Instantly share code, notes, and snippets.

@roccodev
Created March 30, 2019 12:17
Show Gist options
  • Select an option

  • Save roccodev/20f488f21d5cb90fe91f315599aa197b to your computer and use it in GitHub Desktop.

Select an option

Save roccodev/20f488f21d5cb90fe91f315599aa197b to your computer and use it in GitHub Desktop.
Object map data scraper
function findHashes(query) {
let url = `https://radar.zeldamods.org/objs/MainField/?q=${encodeURI(query)}&withMapNames=false&limit=100000`
let result = []
let xml = new XMLHttpRequest()
function load() {
console.log(this.responseText)
let json = JSON.parse(this.responseText)
json.forEach(obj => {
if (obj.hard_mode) return
result.push(obj.hash_id.toString())
})
document.write(JSON.stringify(result))
}
xml.onload = load
xml.open("GET", url)
xml.send()
}
findHashes("Bokoblin OR Lizalfos OR Moblin")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment