how can i parse html with lxml
<p>I have this html:</p>

<pre><code>&lt;td class="name-td alLeft bordR"&gt;13.10.2016, Thu&lt;span class="sp"&gt;|&lt;/span&gt;17:00&lt;/td&gt;
</code></pre>

<p>I want to get a date (13.10.2016) and a time (17:00).</p>

<p>I'm doing that:</p>

<pre><code>t = lxml.html.parse(url)
nextMatchDate = t.findall(".//td[@class='bordR']")[count].text
</code></pre>

<p>But getting an error, </p>

<pre><code>IndexError: list index out of range
</code></pre>

<p>I think it happens because I have a html-tags in <code>a</code> tag</p>

<p>Could you help me please?</p>

<p>There's a method called <a href="http://lxml.de/api/lxml.etree._Element-class.html#itertext" rel="nofollow"><code>.itertext</code></a> that:</p>

<blockquote>
  <p>Iterates over the text content of a subtree.</p>
</blockquote>

<p>So if you have an element <code>td</code> in a variable <code>td</code>, you can do this:</p>

<pre><code>&gt;&gt;&gt; text = list(td.itertext()); text
['13.10.2016, Thu', '|', '17:00']

&gt;&gt;&gt; date, time = text[0].split(',')[0], text[-1]

&gt;&gt;&gt; datetime_text = '{} at {}'.format(date, time)

&gt;&gt;&gt; datetime_text
'13.10.2016 at 17:00'
</code></pre>

python html parsing