pitchfork最佳新音乐混搭

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pitchfork最佳新音乐混搭相关的知识,希望对你有一定的参考价值。

  1. <cfset apiKey="yourApiKeyHere">
  2. <!--- Grab the feed --->
  3. <cfset pitchforkFeed = XmlParse("http://feeds.feedburner.com/PitchforkBestNewAlbums?format=xml")>
  4. <!--- Pull the titles --->
  5. <cfset titles = XmlSearch(pitchforkFeed, "/rss/channel/item/title/")>
  6. <!--- The titles need to be scrubbed so they actually work as arguments to the FilesTube API --->
  7. <cfset numItems = ArrayLen(titles)>
  8. <cfloop index="i" from="1" to=#numItems#>
  9. <cfset artistAlbum = #titles[i].xmlText#>
  10. <cfset noSpaceName = REREplace(artistAlbum, "&[##d]+;", "", "ALL")>
  11. <cfset noSpaceName = REREplace(noSpaceName, "(s)+", " ", "ALL")>
  12. <cfset noSpaceName = REREplace(noSpaceName, " ?- ?", " ", "ALL")>
  13. <cfset noSpaceName = URLEncodedFormat(noSpaceName, "utf-8")>
  14. <cfset filesTubeURL[i] = "http://api.filestube.com/?key=#apiKey#&phrase=#noSpaceName#">
  15. </cfloop>
  16. <!--- This is where we grab shit from the FT API --->
  17. <cfset urlLength = ArrayLen(filesTubeURL)>
  18. <cfloop index="j" from="1" to=#urlLength#>
  19. <cfhttp method="Get" url="#filesTubeURL[j]#">
  20. <!--- I should save these as a file so that processing isn't ridiculous --->
  21. <cfset filesTubeFeed = XmlParse("#cfhttp.FileContent#")>
  22. <cfset links = XmlSearch(filesTubeFeed, "/answer/results/hits/")>
  23. <cfset linkLength = ArrayLen(links)>
  24. <cfoutput>
  25. <!--- Start outputing the urls --->
  26. <p>#titles[j].xmlText#</p>
  27. <ul>
  28. <cfloop index="k" from ="1" to="#linkLength#">
  29. <li>
  30. <p>
  31. #links[k].name.xmlText#&mdash;
  32. #links[k].size.xmlText# <br />
  33. <a href=#links[k].address.xmlText#>#links[k].address.xmlText#</a>
  34. </p>
  35. </li>
  36. </cfloop>
  37. </ul>
  38. </cfoutput>
  39. </cfloop>

以上是关于pitchfork最佳新音乐混搭的主要内容,如果未能解决你的问题,请参考以下文章

如何使用 discord.py 在音乐机器人上获得最佳音频质量?

这个2017最佳数据可视化案例,竟是个音乐剧freestyle

谁有跑步音乐,百度云,比较新的!

酷狗音乐

在波点音乐听周杰伦新歌专辑,一起“用音乐穿越”

库客音乐2021年财报:拥抱素质教育新蓝海