Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rampageX/6ce7db8db711abe30262729df1952360 to your computer and use it in GitHub Desktop.
Save rampageX/6ce7db8db711abe30262729df1952360 to your computer and use it in GitHub Desktop.
导出网易云音乐歌单到 AppleMusic / Spotify 等平台
/**
* 使用方法:
* 1. 用 Chrome 打开歌单的 web 页面(可以通过分享拿到链接,链接类似这样:http://music.163.com/playlist?id=xxx&userid=yyy)
* 2. 然后右键“检查”(如果有左上角有 device 选项,需要选择 Laptop 开头的,可以在 Edit/编辑 里添加)
* 3. 在 console 里输入下面脚本,即可输出 “歌曲名 - 歌手名” 格式的内容:
Springsteen - Eric Church
Chattahoochee - Alan Jackson
Baby Now That I Found You - Alison Krauss
Check Yes or No - George Strait
Meanwhile Back At Mama's (feat. Faith Hill) - Tim McGraw/Faith Hill
。。
* 4.通过 https://www.tunemymusic.com/zh-cn 导出到 Apple Music 或者 Spotify 等音乐平台
*/
(function () {
$$(".soil").map(x=>x.innerText="") // 干死所有干扰项
let result=$$(".m-table tr")
.map(x=>$$("td",x)
.map(y=>y.textContent))
.map(x=>x.length>0 ? ( x[3] + " - " + x[1].replace(/-.*|MV$/, "")) : "")
.join("\n")
console.log(result);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment