开发者

How to make a feed generator for any webpages?

开发者 https://www.devze.com 2023-03-04 03:30 出处:网络
Feedity mak开发者_StackOverflowes feeds address for any webpages and I would like to make an application like this.

Feedity mak开发者_StackOverflowes feeds address for any webpages and I would like to make an application like this.

How did they implement it?


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:

  1. Pull in html from the requested url
  2. Cleanse the HTML so it could be converted to XML (or use something like the HTML Agility Pack)
  3. 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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消