Skip to content

Instantly share code, notes, and snippets.

@Getaji
Created July 24, 2020 02:52
Show Gist options
  • Save Getaji/aba8db5e4b644c54b4491fe5574b415c to your computer and use it in GitHub Desktop.
Save Getaji/aba8db5e4b644c54b4491fe5574b415c to your computer and use it in GitHub Desktop.
Amazon Musicのアルバム一覧のデータを取得するスクリプト
$(".albumTile").toArray().map((el) => ({
albumArt: el.querySelector(".albumArt").src,
playerLink: el.querySelector("a[data-ui-click-action=\"playAlbum\"]").href,
title: el.querySelector(".primaryTitle").innerText,
albumLink: el.querySelector(".primaryTitle a").href,
author: el.querySelector(".secondaryTitle").innerText,
authorLink: el.querySelector(".secondaryTitle a").href,
albumSongCount: el.querySelector(".albumSongCount").innerText.match(/\d+/)[0],
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment