Skip to content

Instantly share code, notes, and snippets.

@TaizWeb
Last active April 27, 2018 23:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TaizWeb/45a2d14ee70f938821897795fba6616c to your computer and use it in GitHub Desktop.
Save TaizWeb/45a2d14ee70f938821897795fba6616c to your computer and use it in GitHub Desktop.
// 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