I need to grab all the tags that contain text using lxml.html. I have been using {e.tag for e in doc.xpath('.//*[text()= true()]')}, but both wildcard and text() queries in lxml are notoriously slow. Is there a more speedy way to do it.
I need to grab all the tags that contain text using lxml.html . I
Share
To get a set of tag names whose elements have some text: