public GetElementWithAttribute ( |
||
root | ||
elementName | string | |
attributeName | string | |
attributeValue | string | |
return |
private string GetArtistName(HtmlNode body) { var headerNode = helper.GetElementWithAttribute(body, "h1", "class", "header"); var movieName = helper.GetElementWithAttribute(headerNode, "span", "class", "itemprop"); return((movieName == null) ? string.Empty : movieName.InnerText); }
private HtmlAgilityPack.HtmlNode GetSongNodeList(HtmlAgilityPack.HtmlNode body) { var contentNode = helper.GetElementWithAttribute(body, "div", "class", "section"); //var songList = contentNode.ChildNodes;// helper.GetElementWithAttribute(contentNode, "p", "class", "row"); return(contentNode); //var song = helper.GetElementWithAttribute(songList, "li", "class", "song-wrap"); //return helper.GetElementWithAttribute(song, "span", "class", "main"); }