Last active
March 17, 2017 18:56
-
-
Save yuche/f7f3c3b0bc14517eacc27a065d7c5b19 to your computer and use it in GitHub Desktop.
网易云音乐排行榜数据
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
// 打开 http://music.163.com/#/discover/toplist 在控制台运行 | |
// 数据会自动格式化复制 | |
const toplist = $('#toplist') | |
const list = [...toplist.querySelectorAll('.item')].map(node => { | |
const nameNode = node.querySelector('.name a') | |
const name = nameNode.innerHTML | |
const id = nameNode.getAttribute('href').slice(21) | |
const meta = node.querySelector('.s-fc4').innerHTML | |
const imgUrl = node.querySelector('.avatar img').src.slice(0, -12) | |
return { name, id ,imgUrl , meta } | |
}) | |
copy(list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment