Skip to content

Instantly share code, notes, and snippets.

@multimeric
Created November 4, 2019 11:40
Show Gist options
  • Save multimeric/0cd7adbed8e4ea21b59b2638cc936ce0 to your computer and use it in GitHub Desktop.
Save multimeric/0cd7adbed8e4ea21b59b2638cc936ce0 to your computer and use it in GitHub Desktop.
# Scrapes price data from http://www.mtggtm.com.au, a Magic the Gathering shop website
# Paste this into the console on a product list page, e.g. http://www.mtggtm.com.au/product-list/466?page=1
$$('.item_data').forEach(el => {
const name = el.querySelector('.item_name');
const price = el.querySelector('.price');
console.log(name.innerText + '\t' + price.innerText);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment