I scrapped some html via xpath, that I then converted into an etree. Something similar to this:
<td> text1 <a> link </a> text2 </td>
but when I call element.text, I only get text1 (It must be there, when I check my query in FireBug, the text of the elements is highlighted, both the text before and after the embedded anchor elements...
Use element.xpath("string()")
or lxml.etree.tostring(element, method="text")
- see the documentation.