Следующий код Python повышает исключение: < /p>
Код: Выделить всё
tree.find(".//table[contains(@class, 'wikitable')]//tr")
< /code>
SyntaxError: invalid predicate
< /code>
Interestingly the following works:
tree.xpath(".//table[contains(@class, 'wikitable')]//tr")
< /code>
Why?
I am trying to understand why in this case, using lxml.html
Подробнее здесь: https://stackoverflow.com/questions/794 ... -lxml-find