title: Python - Getting the text of a link with Etree using Xpath
body: <p>I'm trying to get the text &quot;Former United States Secretary Of State&quot; out of this tag.
  I've tried many ways but cannot seem to get it.</p>
  <pre><code>&lt;div class=&quot;tag&quot;&gt;&lt;a href=&quot;en/profession/748/former-united-states-secretary-of-state&quot; class=&quot;&quot;&gt;Former United States Secretary Of State&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  <p>This is my code:</p>
  <pre><code>site_content = etree.HTML(result)
  selection = site_content.xpath(xpath_select)
  content = [item.strip() for item in selection]
  </code></pre>
  <p>Every other xpath is working.
  This is the xpath I'm using as there are multiple of this one tag on the page &quot;/html/body/div[5]/div[4]/div[5]/div[*]&quot;</p>
  <p>Any help in right direction would be greatly appreciated.</p>
  <p>Working url = <a href="https://www.blackandwhitequotes.com/en/quotes/william-jennings-bryan_1182154_1&amp;key=2OP8jfJC1D" rel="nofollow noreferrer">https://www.blackandwhitequotes.com/en/quotes/william-jennings-bryan_1182154_1&amp;key=2OP8jfJC1D</a></p>