Skip to content

Instantly share code, notes, and snippets.

@ggicci
Created October 29, 2023 20:26
Show Gist options
  • Save ggicci/ed537584e44f335a4768f795eff1c11e to your computer and use it in GitHub Desktop.
Save ggicci/ed537584e44f335a4768f795eff1c11e to your computer and use it in GitHub Desktop.
QQ音乐获取歌单列表
// 在浏览器打开如下 URL,替换 id 为你自己的歌单 id
// https://y.qq.com/musicmac/v6/playlist/detail.html?id=3011946123
// Console Script:
const songList = [];
for (const doc of document.querySelectorAll('.songlist__li')) {
songList.push({
song: doc.querySelector('.mod_songname__name').text,
singer: doc.querySelector('.singer_name').text,
album: doc.querySelector('.album_name').text,
})
}
console.info("Number of songs:", songList.length);
console.info(JSON.stringify(songList));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment