public RssGenerator GetPodcastGenerator(ParsedRSSFeedItem items) { RssGenerator rssGenerator = new RssGenerator { Title = "Joel Rich Audio Roundup Podcast", Description = "Joel Rich's famous Audio Roundup picks as a podcast. = Beta)", HomepageUrl = "http://www.torahmusings.com/category/audio/", AuthorName = "Joel Rich / Avi Levin", AuthorEmail = "*****@*****.**", Episodes = new List<Episode>(), ImageUrl = "http://i0.wp.com/torahmusings.com/wp-content/uploads/2013/08/microphone.jpg", iTunesCategory = "Temp", iTunesSubCategory = "Temp", }; foreach (ParsedRSSFeedLink item in items.Links) { foreach (ILinkParser parser in _parsers) { Episode episode = parser.ParseLink(item); if (episode != null) { rssGenerator.Episodes.Add(episode); break; } } } return rssGenerator; }
public ParsedRSSFeedItem Parse(XElement feed) { XElement item = feed.Descendants("item").First(x => !x.Element("title").Value.Contains("Special")); DateTime dateUpdated = DateTime.Parse(item.Element("pubDate").Value); string link = item.Element("link").Value; string content = item.Element(XName.Get("encoded", "http://purl.org/rss/1.0/modules/content/")).Value; ParsedRSSFeedItem parsedRSSFeedItem = new ParsedRSSFeedItem { ItemLink = link, DateUpdated = dateUpdated, Links = CQ.CreateFragment(content).Select("li").Has("a").Select(ParseLink).Where( x => x != null).ToList() }; return parsedRSSFeedItem; }