I have this xpath request:
/html/body//tbody/tr[*]/td[*]/a[@title]/@href
It retrieves all the links with the title attribute and gives the FireFox Xpath checkerhref in addition .
However, I can not use it with lxml.
from lxml import etree
parsedPage = etree.HTML(page)
hyperlinks = parsedPage.xpath("/html/body//tbody/tr[*]/td[*]/a[@title]/@href")
for x in hyperlinks:
print x
This does not produce a result from lxml(empty list).
How would I get the text of a hyperlink containing the attribute header with lxmlunder Python?
source
share