devtools script to extract apple music playlist

it is also a nice example to expand/edit to suit other uses. disclaimer: ai generated code

copy(JSON.stringify(
  [...document.querySelectorAll('div.songs-list-row')].map((row, i) => {
    const links = [...row.querySelectorAll('a.click-action[href]')];

    return {
      rank: i + 1,
      links: links.map(a => ({
        text: a.innerText.trim(),
        url: a.href
      }))
    };
  }),
  null,
  2
));
0
所有评论 0
Avatar
@busylog
准则 博客 联系 反馈 © 2026 Geeknote