Skip to content

Instantly share code, notes, and snippets.

@TaizWeb
Created May 12, 2017 13:08
Show Gist options
  • Save TaizWeb/a9a6eb859c0075da378fd92d392565e1 to your computer and use it in GitHub Desktop.
Save TaizWeb/a9a6eb859c0075da378fd92d392565e1 to your computer and use it in GitHub Desktop.
// Originally made for https://nookipedia.com/wiki/Bugs/Animal_Crossing:_Wild_World
returnedObj = '[\n';
function scrapeBugs() {
for (let i = 0; i < 56; i++) {
bugName = document.getElementById('mw-content-text').children[1].children[1].children[i].children[1].children[0].innerHTML;
returnedObj += `\t{'task_name': '${bugName}', 'task_complete': false},\n`;
}
returnedObj += '\n]';
return returnedObj;
}
console.log(scrapeBugs());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment