pitchfork最佳新音乐混搭
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pitchfork最佳新音乐混搭相关的知识,希望对你有一定的参考价值。
<cfset apiKey="yourApiKeyHere"> <!--- Grab the feed ---> <cfset pitchforkFeed = XmlParse("http://feeds.feedburner.com/PitchforkBestNewAlbums?format=xml")> <!--- Pull the titles ---> <cfset titles = XmlSearch(pitchforkFeed, "/rss/channel/item/title/")> <!--- The titles need to be scrubbed so they actually work as arguments to the FilesTube API ---> <cfset numItems = ArrayLen(titles)> <cfloop index="i" from="1" to=#numItems#> <cfset artistAlbum = #titles[i].xmlText#> <cfset noSpaceName = REREplace(artistAlbum, "&[##d]+;", "", "ALL")> <cfset noSpaceName = REREplace(noSpaceName, "(s)+", " ", "ALL")> <cfset noSpaceName = REREplace(noSpaceName, " ?- ?", " ", "ALL")> <cfset noSpaceName = URLEncodedFormat(noSpaceName, "utf-8")> <cfset filesTubeURL[i] = "http://api.filestube.com/?key=#apiKey#&phrase=#noSpaceName#"> </cfloop> <!--- This is where we grab shit from the FT API ---> <cfset urlLength = ArrayLen(filesTubeURL)> <cfloop index="j" from="1" to=#urlLength#> <cfhttp method="Get" url="#filesTubeURL[j]#"> <!--- I should save these as a file so that processing isn't ridiculous ---> <cfset filesTubeFeed = XmlParse("#cfhttp.FileContent#")> <cfset links = XmlSearch(filesTubeFeed, "/answer/results/hits/")> <cfset linkLength = ArrayLen(links)> <cfoutput> <!--- Start outputing the urls ---> <ul> <cfloop index="k" from ="1" to="#linkLength#"> <li> <p> #links[k].name.xmlText#— #links[k].size.xmlText# <br /> </p> </li> </cfloop> </ul> </cfoutput> </cfloop>
以上是关于pitchfork最佳新音乐混搭的主要内容,如果未能解决你的问题,请参考以下文章
如何使用 discord.py 在音乐机器人上获得最佳音频质量?