Пример #1
0
 private static string GetArtist(HtmlNode n)
 {
     var artistNodes = new List<HtmlNode>();
     artistNodes.AddRange(n.ById("artist"));
     artistNodes.AddRange(n.ById("smallartist"));
     return 
         artistNodes.Where(an => an != null).Select(
             an => an.ChildNodes.First().InnerText).First();
 }
Пример #2
0
        private static Uri GetUrl(HtmlNode n)
        {
            var artistNodes = new List<HtmlNode>();
            artistNodes.AddRange(n.ById("artist"));
            artistNodes.AddRange(n.ById("smallartist"));
            var url = 
                artistNodes.Where(an => an != null).Select(
                    an => an.ChildNodes.First().AttributeValue("href")).FirstOrDefault();

            return url != null ? ("http://www.recordmania.net/" + url).ToUri() : null;
        }