user2477180
user2477180

Reputation: 1

How to identify nonpubsub feeds using SyndicationFeed class in C#

I have so many RSS and atom feed urls. I am using SyndicationFeed class for reading content of these feeds. After viewing page source we can identify, because every feed with pubsubhub feature always have rel="hub" attribute. eg. Suppose I have two feeds [Non pubsubhub feed] http://timesofindia.feedsportal.com/c/33039/f/533929/index.rss and [pubsubhub feed] http://allthingsd.com/feed/

Now my problem is to identify a pubsubhub feed using SyndicationFeed class. please help me.

Upvotes: 0

Views: 142

Answers (1)

Julien Genestoux
Julien Genestoux

Reputation: 32992

I'm not a C# person, but based on the docs, it looks like for each SyndicationFeed object, you can access its links. Then, for each of these SyndicationLink, you should check the rel element. It its value is hub then the href is the hub's url. If there is no rel="hub" element, then you can assume that the feed is not PubSubHubbub enabled :)

PS: Shameless plug: Superfeedr acts as a default hub, which means you can subscribe to any feed whether they support PubSubHubbub or not and receive notifications for them (we also nomarlize the content!)

Upvotes: 0

Related Questions