Created
July 24, 2015 16:34
-
-
Save stdray/c0e8f48295b1fe8f59f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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