Skip to content

Instantly share code, notes, and snippets.

@JRJurman
Created December 20, 2014 21:16
Show Gist options
  • Select an option

  • Save JRJurman/3167df797e3325d3de65 to your computer and use it in GitHub Desktop.

Select an option

Save JRJurman/3167df797e3325d3de65 to your computer and use it in GitHub Desktop.
Pokemon Scrapping
number = document.querySelector(".stats-footer").querySelector("span").textContent.split("/")[0];
name = document.querySelector("h1").textContent;
type = document.querySelector(".card-basic-info").querySelector(".energy").className.substr(12);
stgStr = document.querySelector(".card-type").querySelector("h2").textContent;
stage = stgStr.substring(0, stgStr.length - 8);
if (stage !== "Basic") {
evolvesFrom = document.querySelector(".card-type").querySelector("h4").textContent.split("Evolves From:")[1].trim();
}
hp = document.querySelector(".card-hp").textContent.substr(2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment