def _get_outerhtml(html_node):
 html_string = lxml.html.tostring(html_node)
 return re.sub('[^>]*$', '', html_string, count=1)

def _get_outerhtml ( html_node ) : html_string = lxml . html . tostring ( html_node ) return re . sub ( '[^>]*$' , '' , html_string , count = 1 )
get a string representation of an html node .