Skip to content

Instantly share code, notes, and snippets.

@stdray
Created July 24, 2015 16:34
Show Gist options
  • Select an option

  • Save stdray/c0e8f48295b1fe8f59f3 to your computer and use it in GitHub Desktop.

Select an option

Save stdray/c0e8f48295b1fe8f59f3 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Xml;
namespace ConsoleApplication27
{
class Program
{
static void Main(string[] args)
{
var uri = @"http://eao197.blogspot.com/feeds/posts/default?alt=rss";
using (var reader = XmlReader.Create(uri))
{
var feed = SyndicationFeed.Load(reader);
if (feed != null)
foreach (var item in feed.Items)
{
var links = item.Links.Select(l => l.GetAbsoluteUri().ToString().Substring(0, 60));
Console.WriteLine(item.Title.Text);
foreach (var link in links)
Console.WriteLine("\t{0}", link);
}
}
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment