title: How to extract links from a webpage using lxml, XPath and Python?
body: <p>I've got this xpath query:</p>
  
  <pre><code>/html/body//tbody/tr[*]/td[*]/a[@title]/@href
  </code></pre>
  
  <p>It extracts all the links with the title attribute - and gives the <code>href</code> in <a href="https://addons.mozilla.org/en-US/firefox/addon/1095" rel="nofollow noreferrer">FireFox's Xpath checker add-on</a>.</p>
  
  <p>However, I cannot seem to use it with <code>lxml</code>.</p>
  
  <pre><code>from lxml import etree
  parsedPage = etree.HTML(page) # Create parse tree from valid page.
  
  # Xpath query
  hyperlinks = parsedPage.xpath("/html/body//tbody/tr[*]/td[*]/a[@title]/@href") 
  for x in hyperlinks:
      print x # Print links in &lt;a&gt; tags, containing the title attribute
  </code></pre>
  
  <p>This produces no result from <code>lxml</code> (empty list). </p>
  
  <p>How would one grab the <code>href</code> text (link) of a hyperlink containing the attribute title with <code>lxml</code> under Python?</p>