3.4. XPATH

  • Using lxml module

3.4.1. Example

print(html.xpath("string()")) # lxml.etree only!
# IrisSetosa

print(html.xpath("//text()")) # lxml.etree only!
# ['Iris', 'Setosa']