I get a string of this type
<div class="popup"> <div class="popup-top"></div> <div class="popup-middle"> <div>Тип обложки: обл - мягкий переплет (крепление скрепкой или клеем)</div> <div>Иллюстрации: Черно-белые + цветные</div> </div> <div class="popup-bottom"> </div></div> I need to get this Черно-белые + цветные . and here it is <div>Иллюстрации: Черно-белые + цветные</div> , it can be absent or there can be another order. The only landmark is the word. Иллюстрации:
I tried to do it like this
string illustration = `htmlDocument.DocumentNode.SelectNodes("//div[@class='popup']").Where(x=>x.InnerText.Contains("Иллюстрации:")).Select(s=>s.InnerText).FirstOrDefault();` Everything is ok, but he chooses all the text.
"Тип обложки: 7Бц - твердая, целлофанированная (или лакированная)Иллюстрации: Цветные" , and I need only the Цветные , or let them just take the contents of the div? like this
Иллюстрации: Черно-белые + цветные, дальше закрепленность слово не проблема.
htmlDocument.DocumentNode.SelectNodes("//div").Where(x=>x.InnerText.Contains("Иллюстрации:")).Select(s=>s.InnerText).LastOrDefault();? - Surfin Bird