title: Parse element's tail with requests-html
body: <p>I want to parse an HTML document like this with requests-html 0.9.0:</p>
  
  <pre><code>from requests_html import HTML
  html = HTML(html='&lt;span&gt;&lt;span class="data"&gt;important data&lt;/span&gt; and some rubbish&lt;/span&gt;')
  data = html.find('.data', first=True)
  print(data.html)
  # &lt;span class="data"&gt;important data&lt;/span&gt; and some rubbish
  print(data.text)
  # important data and some rubbish
  </code></pre>
  
  <p>I need to distinguish the text inside the tag (enclosed by it) from the tag's tail (the text that follows the element up to the next tag). This is the behaviour I initially expected:</p>
  
  <pre><code>data.text == 'important data'
  data.tail == ' and some rubbish'
  </code></pre>
  
  <p>But <code>tail</code> is not defined for <a href="http://html.python-requests.org/#requests_html.Element" rel="nofollow noreferrer"><code>Element</code></a>s. Since requests-html provides access to inner <code>lxml</code> objects, we can try to get it from <a href="http://lxml.de/tutorial.html#elements-contain-text" rel="nofollow noreferrer"><code>lxml.etree.Element.tail</code></a>:</p>
  
  <pre><code>from lxml.etree import tostring
  print(tostring(data.lxml))
  # b'&lt;html&gt;&lt;span class="data"&gt;important data&lt;/span&gt;&lt;/html&gt;'
  print(data.lxml.tail is None)
  # True
  </code></pre>
  
  <p>There's no tail in lxml representation! The tag with its inner text is OK, but the tail seems to be stripped away. How do I extract <code>'and some rubbish'</code>?</p>
  
  <p><strong>Edit</strong>: I discovered that <code>full_text</code> provides the inner text only (so much for “full”). This enables a dirty hack of subtracting <code>full_text</code> from <code>text</code>, although I'm not positive it will work if there are any links.</p>
  
  <pre><code>print(data.full_text)
  # important data
  </code></pre>