title: extracting data between span tags with BeautifulSoup Python
body: <p>I would like to extract data between span tags. Here is a sample of html code:</p>
  
  <pre><code>&lt;p&gt;
      &lt;span class="html-italic"&gt;3-Acetyl-&lt;/span&gt;
      &lt;span class="html-italic"&gt;(4-acetyl-5-(β&lt;/span&gt;
      "-"
      &lt;span class="html-italic"&gt;naphtyl)-4,5-dihydro-1,3,4-oxodiazol-2-yl)methoxy)-2H-chromen-2-one&lt;/span&gt;
       "("
      &lt;b&gt;5b&lt;/b&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>I need to get a full name: </p>
  
  <p><code>3-Acetyl-4-acetyl-5-(β-naphtyl)-4,5-dihydro-1,3,4-oxodiazol-2-yl)methoxy)-2H-chromen-2-one</code> (without 5b). I don't know how to extract '-' between the second and the third span tags. Also, a total number of span tags may vary and '-' can be between any span tags. The code I wrote gives me only: 3-Acetyl-4-acetyl-5-(β. Here is a part of my code:</p>
  
  <pre><code>p = soup.find("p")
  name = ""
  for child in p.children:
      if child.name == "span":
          name += child.text
  print name
  </code></pre>
  
  <p>Any help is highly appreciated! </p>