Good day!
Using the lxml (python) library, you need to get content.xpath('//li[@class="list"]') . Now xpath returns an empty list. I believe that due to the fact that there is no <ul> for the <li> list.
How nice and easy to get the content.xpath('//li[@class="list"]') data set for a specific example?
<div class="aaa"> <li class="list">aaaa</li> <li class="list">bbbb</li> <li class="list">cccc</li> </div>
content.xpath('//li[@class="list"]')works fine and returns all three specified elements. Could you give a minimal, self-sufficient and reproducible example that I would feed the python without any changes and end up with your problem? - andreymalroot = content.xpath('//div[@class="pr relative pr_search"]//li')xpath just doesn’t see specific li elements - Yuriy Tigiev//div[@class="pr relative pr_search"]and assigned it to a string variable. In this case,html.fromstring + xpathworks correctly and xpath finds all li elements, but on the original page itself, the same construction does not find the samelielements. - Yuriy Tigievhtml.tostring() = <div class="pr relative pr_search" id="search_pr">\n </div>\nlooks like. that is,lielements are out. - Yuriy Tigiev