900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > 抓取网易云音乐网页歌单(url)js

抓取网易云音乐网页歌单(url)js

时间:2022-06-24 12:57:05

相关推荐

抓取网易云音乐网页歌单(url)js

var importJs=document.createElement('script') //在页面新建一个script标签importJs.setAttribute("type","text/javascript") //给script标签增加type属性importJs.setAttribute("src", '/jquery-3.1.1.min.js') //给script标签增加src属性, url地址为cdn公共库里的document.getElementsByTagName("head")[0].appendChild(importJs) //把importJs标签添加在页面$(function(){var str=""var au=""// au = $(".txt").parent().parent().parent().parent().next().children().next().children().next().next().prop("outerHTML")// console.log("------"+au+"----------")$(".txt").each(function(){au = $(this).parent().parent().parent().parent().next().children().next().children().next().next().data("res-author")var O_url = $($(this).children()).attr("href")var t = ($(this).children().children()).attr("title")str+="["+t+" - "+au+"]("+O_url+") \n"})console.log(str)})

以上是网易云音乐网页版,获取“我的歌单”中所有歌曲名称和 URL 的 js ,可以直接放在控制台使用。

更多内容欢迎访问

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。