I have the following html:
<div class="txt-block">
<h4 class="inline">Aspect Ratio:</h4> 2.35 : 1
</div>
I want to get the value "2.35 : 1" from the content. However, when I try using lxml, it returns an empty string (I am able to get the 'Aspect Ratio' value, probably because that is neatly between tags.)
item.find('div').text
How would I then get the "2.35 : 1" value? Using etree.tostring
does get me the full output.