public Episode ParseLink(ParsedRSSFeedLink link) { var episode = _parser.ParseLink(link); var parsedVerbiage = (episode == null ? "could NOT parse" : "PARSED"); _log.Debug($"{_parserClass} {parsedVerbiage} {link.LinkURL}"); return episode; }
public Episode ParseLink(ParsedRSSFeedLink link) { if (!link.LinkURL.EndsWith(".mp3")) return null; return new Episode { FileUrl = link.LinkURL, Permalink = link.LinkURL, Summary = link.Description, PublicationDate = DateTime.MinValue, Title = link.LinkTitle, FileType = "audio/mp3", Duration = "0:00", }; }
private static ParsedRSSFeedLink ParseLink(IDomObject linkNode) { ParsedRSSFeedLink parsedRSSFeedLink; CQ linkCq = new CQ(linkNode.Clone()); CQ aCq = linkCq.Find("a"); if (aCq.Any()) { ParsedRSSFeedLink parsedRSSFeedLink1 = new ParsedRSSFeedLink { LinkURL = aCq.Attr<string>("href"), LinkTitle = aCq.First().Text() }; ParsedRSSFeedLink link = parsedRSSFeedLink1; aCq.FirstElement().Remove(); link.Description = linkCq.Text().Trim(); parsedRSSFeedLink = link; } else { parsedRSSFeedLink = null; } return parsedRSSFeedLink; }