title: extract text from span with beautifulsoup
body: <p>I am trying to parse some LinkedIn data and I would like to grab the text inside this span within a for loop. So the below would return a string = "2 shared connections"</p>
  
  <pre><code>&lt;span class="search-result__social-proof-count Sans-13px-black-55%-semibold text-align-left ml1"&gt;
        2 shared connections
      &lt;/span&gt;
  </code></pre>
  
  <p>And here is the xpath:</p>
  
  <pre><code>//*[@id="ember4490"]/span
  </code></pre>
  
  <p>So far I am able to select the span correctly with this code:</p>
  
  <pre><code>mutual_conns_with_text = div.find('span', {'class': 'search-result__social-proof-count Sans-13px-black-55%-semibold text-align-left ml1'})
  </code></pre>
  
  <p>However, the above selects the entire span NOT <strong>just the text</strong>. And the code below throws an exception:</p>
  
  <pre><code>mutual_conns_with_text = div.find('span', {'class': 'search-result__social-proof-count Sans-13px-black-55%-semibold text-align-left ml1'}).getText()
  </code></pre>
  
  <p>the exception:</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'getText'
  </code></pre>