This looks a little like yql, which can be used for something similar. Given that HTML can be XML, and RSS feeds are XML as well, this should not be too difficult to implement. If I were to approach a custom implementation of this, I would probably attempt the following:
Pull in html from the requested url
Cleanse the HTML so it could be converted to XML (or use something like the HTML Agility Pack)
Use XSLT to translate the XML document into an RSS feed based on a set of rules (that extract links, etc.)
All of that having been said, if I could use something like yql instead, I would definitely do that, as there can be a lot of pitfalls in the custom implementation (bad html, changing url's, defining rules, caching, etc.)
发布评论
评论(1)
这看起来有点像 yql,它可以用于类似的事情。鉴于 HTML可以是 XML,并且 RSS 提要也是 XML,因此实现起来应该不会太困难。如果我要对此进行自定义实现,我可能会尝试以下操作:
。有人说过,如果我可以使用像 yql 这样的东西,我肯定会这样做,因为自定义实现中可能存在很多陷阱(糟糕的 html、更改 url、定义规则、缓存等)
This looks a little like yql, which can be used for something similar. Given that HTML can be XML, and RSS feeds are XML as well, this should not be too difficult to implement. If I were to approach a custom implementation of this, I would probably attempt the following:
All of that having been said, if I could use something like yql instead, I would definitely do that, as there can be a lot of pitfalls in the custom implementation (bad html, changing url's, defining rules, caching, etc.)