【发布时间】:2014-02-03 18:08:48
【问题描述】:
我正在寻找一种简单的方法来解析 RSS 描述标签,以便存储 img 链接以及显示的任何文本。
我正在使用 Last RSS 来解析 RSS 提要,但是,每个提要的描述标签都有很多不同的信息,而且它们都有很大的不同。
目前我正在使用 Simple HTML Dom Parser 从描述中获取 img 链接,但是,这似乎不适用于所有提要。例如,它无法识别来自 dribbble 的以下描述中的 img:
<![CDATA[<a height="150" href="http://dribbble.com/shots/1405514-sparrows" width="200"><img alt="sparrows" height="600" src="http://d13yacurqjgara.cloudfront.net/users/14152/screenshots/1405514/sparrows.jpg" width="800" /></a><p>We are currently working on identity for a new Canadian project called "sparrows". A place for creatives to gather some useful readings.</p>]]>
获取此信息的最佳方式是什么?
【问题讨论】:
标签: php rss simple-html-dom