I suppose it will be as simple as:
from lxml.etree import tostring
inner_html = tostring(img)
As for getting content from inside <p>
, say, some selected element el
:
content = el.text_content()
I suppose it will be as simple as:
from lxml.etree import tostring
inner_html = tostring(img)
As for getting content from inside <p>
, say, some selected element el
:
content = el.text_content()