title: BeautifulSoup: Extract the data in the text after a particular span
body: <p>I know there's loads of similar questions to this out there, I just can't figure out my specific example.</p>
  
  <p>On <a href="https://www.uniprot.org/uniprot/O00203#sequences.html" rel="nofollow noreferrer">this</a> page, I want to extract the number '121,320' from the line: 'Mass (Da):121,320'</p>
  
  <p>I can see from BeautifulSoup that this is where I want:</p>
  
  <pre><code>&lt;/div&gt;&lt;a class="show-link" href="#" id="O00203-show-link" style="display:none"&gt;Show »&lt;/a&gt;&lt;/div&gt;&lt;div class="sequence-isoform-rightcol"&gt;&lt;div&gt;&lt;span class="sequence-field-header tooltiped" title="Sequence length."&gt;Length:&lt;/span&gt;&lt;span&gt;1,094&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="sequence-field-header tooltiped" title="The mass of the unprocessed protein, in Daltons."&gt;Mass (Da):&lt;/span&gt;&lt;span&gt;121,320&lt;/span&gt;
  </code></pre>
  
  <p>I was trying this:</p>
  
  <pre><code>import urllib
  import requests
  import sys
  from bs4 import BeautifulSoup
  
  uniprot_list = ['O00203']
  for each_id in uniprot_list:
          data = requests.get('https://www.uniprot.org/uniprot/' + each_id + '#sequences.html')
          soup = BeautifulSoup(data.content, 'html.parser')
  
  
          #prints all spans
          print(soup.find_all('span'))
  
          #prints empty list
          print(soup.find_all('span',title_='The mass of the unprocessed protein, in Daltons.'))
  </code></pre>
  
  <p>The closest I've gotten was by trying to follow <a href="https://stackoverflow.com/questions/40003342/extracting-particular-data-with-beautifulsoup-with-span-tags">this</a> answer on SO:</p>
  
  <pre><code>    div1 = soup.find("div", { "class" : "sequence-isoform-rightcol" }).findAll('span', { "class" : "sequence-field-header tooltiped" })
      for x in div1:
              print(x.text)
  </code></pre>
  
  <p>The issue is that is prints out:</p>
  
  <pre><code>Length:
  Mass (Da):
  </code></pre>
  
  <p>without the actual values.</p>
  
  <p>How do I extract the mass from each page that I have? In this case 121,320?</p>