开发者

Determining new RSS items in .Net

开发者 https://www.devze.com 2022-12-15 02:23 出处:网络
I\'ve been looking at some different options for rea开发者_运维知识库ding RSS Feeds in .Net.I\'ve seen frameworks like Argotic, etc.My question is, do any of these frameworks assist in determining whi

I've been looking at some different options for rea开发者_运维知识库ding RSS Feeds in .Net. I've seen frameworks like Argotic, etc. My question is, do any of these frameworks assist in determining which items in a feed are new? Or is that outside their scope?


I usually use the rss.net open source project found here (http://www.rssdotnet.com/) which gives you enough information to determine if items in the current feed (when compared to your local items) are new or not. Given that RSS is stateless it doesn't know when you last requested the feed and therefore couldn't provide which items in the current feed are new or not compared to the last time you queried the feed. Simply storing the slug for the rss item should be enough for a simple comparison to determine what is new or not. Also you have the publish date and a few other items that generally don't change.


@taylonr - My approach (for the purpose of my answer let's assume rss feeds only, not Atom) to this was going to be:

Compare the feed's <lastbuilddate> date to that of the previous poll
If newer:
    Compare the <pubDate> of the feed's oldest <item> to the <pubDate> of the previous feed's newest <item>
    If newer, then there are new items in the feed

But then I read this article and liked his idea of comparing feeds based on a compound key of <link> + <title> + <description>.

0

精彩评论

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