解析带有Javascript的SHOUTcast服务器信息表? [英] Parsing SHOUTcast server information table with Javascript?
问题描述
我目前正在尝试解析html页面 http://84.19.184.204:8000/played .html 使用JS.
I'm currently trying to parse the html page http://84.19.184.204:8000/played.html using JS.
但是自从我不熟悉JS以来,这已经很难了.html页面包含一个表,该表包含上次播放的歌曲的历史记录...该列表是我要解析的.
But it's been hard since I'm new to JS... The html page contains a table which has the history of last played songs... This list is what I want to parse.
我使用XMLHttpRequest()
,但我不明白如何解析元素:(
I use XMLHttpRequest()
but I can't understand how to parse the elements :(
有人可以帮我吗?
推荐答案
鉴于Shoutcast played.html
页面布局的静态性质,正则表达式可能是提取信息的最佳选择.但是,请参阅我对您的问题的评论,以了解为什么用JavaScript这样做可能不是一个好主意.
Given the static nature of the layout of Shoutcast played.html
pages, a regular expression would probably be the best choice to extract information. However, see my comment to your question as to why doing this in JavaScript might not be a good idea.
这篇关于解析带有Javascript的SHOUTcast服务器信息表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!