title: Extract href values with xpath on Python 2.7
body: <p>I have this HTML:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;a href=&quot;some content&quot;&gt;Click here&lt;/a&gt;
  </code></pre>
  <p>How can I extract <code>some content</code> and <code>click me</code> with <code>xpath</code> on Python 2.7?</p>
  <p>So far i have the following ( extract only &quot;some content&quot; from href results):</p>
  <pre class="lang-py prettyprint-override"><code>import lxml.etree as LE
  import requests
  
  r = requests.get(&quot;http://localhost&quot;)
  html = r.text
  root = LH.fromstring(html)
  print root.xpath('//a/@href')
  </code></pre>