Last active
April 27, 2018 23:57
-
-
Save TaizWeb/45a2d14ee70f938821897795fba6616c to your computer and use it in GitHub Desktop.
This file contains 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
// Originally used on https://nookipedia.com/wiki/Fish/Animal_Crossing:_Wild_World to extract fish data | |
returnedObj = '[\n'; | |
function scrapeFish() { | |
for (var i = 0; i < 56; i++) { | |
fishName = document.body.children[7].children[0].children[0].children[1].children[0].children[1].children[1].children[4].children[3].children[0].children[2].children[0].children[1].children[i].children[1].children[0].innerHTML; | |
returnedObj += `\t{'task_name': '${fishName}', 'task_complete': false},\n`; | |
} | |
returnedObj += '\n]'; | |
return returnedObj; | |
} | |
console.log(scrapeFish()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment