Created
October 29, 2023 20:26
-
-
Save ggicci/ed537584e44f335a4768f795eff1c11e to your computer and use it in GitHub Desktop.
QQ音乐获取歌单列表
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 在浏览器打开如下 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