title: Extracting text from span class tag with beautifulsoup
body: <p>I am trying to extract some elements of text between a span class from a website.</p>
  
  <p>Here is a snippet of the HTML code:</p>
  
  <pre><code>&lt;h1&gt;2 Some address&lt;/h1&gt;
                  &lt;/div&gt;
                  &lt;div id="smi-summary-items"&gt;
                      &lt;div id="smi-price-string"&gt;&amp;euro;230,000&lt;/div&gt;
                      &lt;span class="header_text"&gt; Detached House&lt;/span&gt;&lt;span class="bar"&gt;&amp;nbsp;|&amp;nbsp;&lt;/span&gt;&lt;span class="header_text"&gt;3 Beds&lt;/span&gt;&lt;span class="bar"&gt;&amp;nbsp;|&amp;nbsp;&lt;/span&gt;&lt;span class="header_text"&gt;2 Baths&lt;/span&gt;
                      &lt;!-- Text_Link_Full_Ad_Unit --&gt;
                      &lt;div id='dfp-text_link_full_ad_unit' class='sale'&gt;
                          &lt;script type='text/javascript'&gt;
                              googletag.cmd.push(function()
                                  {
                                      googletag.display('dfp-text_link_full_ad_unit');
                                  }
                              );
                          &lt;/script&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>I would like to extract the text of "3 Beds" and "2 Baths".</p>
  
  <p>I've tried a few solutions but mainly getting errors or an empty result.</p>
  
  <p>Can anyone suggest a solution?</p>