Problem: need to access the html for a selector Solution: found here: from lxml import etree etree.tostring(selector._root)