Welcome to MSDN Blogs Sign in | Join | Help

Wite your own RSS News/Blog aggregator in <100 lines of code

The internet is a great way for people/entities to publish information. An RSS reader is a tool to help funnel only the information that you think is important to you.

 

You can subscribe to RSS sources (Blogs, news sites, businesses, authors) by choosing a button that says Syndication, RSS, or XML button on their web site.  That leads you to an XML document, which contains recently published items. For example, MSNBC has RSS feeds for things like Top News, Weather, Sports, Health. You can subscribe to my blog with this link: http://blogs.msdn.com/calvin_hsia/Rss.aspx

 

MSN Search has a new feature that will allow you to get an RSS feed for any search. That means you can subscribe to topics such as “tsunami relief”, “Bill Gates”, or “Space Shuttle.” Then, any time the search results change for that topic, the RSS feed will change.

 

I’ve been using Intravnews, but it didn’t like the XML from the MSN Search. That inspired me to write my own RSS reader.

 

How complicated can an RSS reader be?

 

The sample code can subscribe to any RSS feed. If you leave the 2nd parameter empty then MSN Search is used to create the RSS feed. The code then retrieves the RSS XML and parses through the items. A table is maintained to “remember” which items have already been seen. If it’s a new item, then it’s added to an Outlook folder.

 

Run the code as often as you like, or make it into a service that will run automatically.

 

You’ll need to change the MailboxName to your mailbox. All posts go to a folder under “RSS”: the folders are automatically created.

 

 

 

48054

Published Friday, January 14, 2005 6:20 PM by Calvin_Hsia

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Wite your own RSS News/Blog aggregator in <100 lines of code

Monday, January 17, 2005 6:21 PM by CalvinH [MS]
i modified the code a little so that the HTML of the link is not retrieved and the HTMLBody of the Outlook message is the RSS item description, so a blog is stripped of any CSS, and any MSN search results appear as returned in the RSS feed.

# Randy's Devcon Demo

Sunday, June 12, 2005 8:31 PM by Calvin Hsia's WebLog
Randy is using my blog as part of a Demo at the Devcon keynote. He has some Fox code running from Outlook...

# Webcrawl a blog to retrieve all entries locally: RSS on steroids

Thursday, May 25, 2006 8:32 PM by Calvin Hsia's WebLog
Today’s sample shows how to create a web crawler in the background. This crawler starts with a web page,...

# re: Wite your own RSS News/Blog aggregator in <100 lines of code

Tuesday, September 26, 2006 2:40 PM by sam
WoW is the name of the new rss reader in visual foxpro 8

Demos:

http://www.youtube.com/watch?v=LYuGz1czG_k

http://www.youtube.com/watch?v=76sRqAgTHyM

# re: Wite your own RSS News/Blog aggregator in &lt;100 lines of code

Monday, March 12, 2007 5:14 AM by ...

mmm.. nice design, I must say..

# re: Wite your own RSS News/Blog aggregator in &lt;100 lines of code

Tuesday, March 20, 2007 1:14 AM by ...

Chi ha fatto questo? E un buon posto per trovare le informazioni importanti!:)

# re: Wite your own RSS News/Blog aggregator in <100 lines of code

Friday, March 28, 2008 1:07 PM by Jeff Berezin

This is excellent work.  I modified it for my needs (removed the outlook stuff) and added to more try/catch stuff to catch empty descriptions (like in craigslist used car feeds).

Thanks much.

# Calvin Hsia s WebLog Wite your own RSS News Blog aggregator in lt 100 | Toe Nail Fungus

# Calvin Hsia s WebLog Wite your own RSS News Blog aggregator in lt 100 | low cost car insurance

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker