title: How to scrape between span tags using beautifulsoup
body: <p>I am trying to scrape text using python+beautifulsoup. I type in code such as:</p>
  
  <pre><code>soup.find_all("span")[0]
  </code></pre>
  
  <p>This gets me:</p>
  
  <pre><code>&lt;span style="margin-right: 0.9em"&gt;TEXT1 &lt;span style="color:
  #111111; margin-left: 0.2em"&gt;TEXT2 &lt;/span&gt;TEXT3 &lt;/span&gt;
  </code></pre>
  
  <p>This is great. But the problem is that I want to extract <code>TEXT1</code>, <code>TEXT2</code>, and <code>TEXT3</code> separately. </p>
  
  <p>I don't know how to do this. If I do:</p>
  
  <p>soup.find_all("span")[0].find_all("span"), I only get</p>
  
  <pre><code>&lt;span style="color:
  #111111; margin-left: 0.2em"&gt;TEXT2 &lt;/span&gt;
  </code></pre>
  
  <p>I think that this is because this particular one contains both <code>&lt;span&gt;</code> and <code>&lt;/span&gt;</code>. How do I pick out <code>TEXT1</code>, <code>TEXT2</code>, and <code>TEXT3</code>? </p>