Created
March 30, 2019 12:17
-
-
Save roccodev/20f488f21d5cb90fe91f315599aa197b to your computer and use it in GitHub Desktop.
Object map data scraper
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
| 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