Idea: add with_top=True param to lxml.html.tostring()

Nov. 6, 2017
10:21 p.m.
Hey folks, to get the HTML within an element as a string (ie. innerHTML) you currently need to: ''.join([x.text, *[lxml.html.tostring(y,encoding='unicode') for y in x]]) I therefore think a with_top=True parameter should be added to lxml.html.tostring(). Best regards, Martin
2666
Age (days ago)
2666
Last active (days ago)
0 comments
1 participants
participants (1)
-
martin@bitdweller.com