Ruby:从IceCast服务器捕获歌曲标题信息
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ruby:从IceCast服务器捕获歌曲标题信息相关的知识,希望对你有一定的参考价值。
IceCast server's sometimes offer meta-data information on a particular piece. Here's an example of a data scrape from Classical KUSC
require 'cgi' require 'rss' require 'open-uri' require 'rexml/document' xspf = "http://915.kuscstream.org:8000/kuscaudio128.mp3.xspf" open( xspf ) do |http| response = http.read xml = REXML::Document.new( response ) xml.elements.each do |t| puts t end =begin result = RSS::Parser.parse(response, false) puts result items = result.playlist puts items items.each do |item| # puts "Title:" + item.title + " " + item.link + " " + item.description + " " end =end end
以上是关于Ruby:从IceCast服务器捕获歌曲标题信息的主要内容,如果未能解决你的问题,请参考以下文章
将 getUserMedia 流式传输到 Icecast 服务器?