Use the script below to quickly scrap structured data from the USA Nintendo Amiibo Line-Up: http://www.nintendo.com/amiibo/line-up.
After running this code in the Web Insector Console tab, in Chrome, the serialized JSON will be waiting patiently in your paste buffer.
copy(Array.from(document.querySelectorAll('a[data-index]')).map((a) => {
const gameID = a.parentNode.dataset.gameId;
const relatedTo = a.querySelector('[itemprop=isRelatedTo]');
const spans = Array.from(a.querySelectorAll('span'));
const offset = /coming-soon-badge/.test(spans[spans.length - 1].className) ? -2 : -1;
const availableElement = spans[spans.length + offset];
return {
gameID,
href: a.href,
name: a.querySelector('[itemprop=name]').textContent,
image: a.querySelector('[itemprop=image]').src,
relatedTo: relatedTo && relatedTo.textContent,
available: availableElement.textContent.replace(/Available |[\n\t]/g, '')
};
}));
Sample output as of 2017/08/20: