Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmmsoft/40f33afd237f7377ab0929ec7ad172ea to your computer and use it in GitHub Desktop.
Save lmmsoft/40f33afd237f7377ab0929ec7ad172ea to your computer and use it in GitHub Desktop.
// 导出douban.fm的红星歌曲到网易云音乐
// 具体使用方法见 https://www.zhihu.com/question/34521014/answer/177048898
var a = "\n<?xml version=\"1.0\" encoding=\"windows-1252\"?>\n<List ListName=\"豆瓣红心\">\n";
for(var i in $$(".songlist-song .top")) {
a = a
+ "<File><FileName>"
+ $$(".songlist-song .top")[i].querySelector(".titles p span .artist-name").innerText.replace("&","&amp;")
+ "-"
+ $$(".songlist-song .top")[i].querySelector(".titles h3 .link").innerText.replace("&","&amp;")
+ "</FileName></File>\n"
}
console.log(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment