Python webscraping using beautiful soup
<p><img src="https://i.stack.imgur.com/3BNrE.png" alt="Extract between span span"></p>

<pre><code>nameList = soup.find_all("span", {"class":"answer-number"})
for item in nameList:
    print('item.content[0]')
</code></pre>

<p>I wrote the above code, but it is not working. Please help. I want the number 6a from it.</p>

<pre><code>&gt;&gt;&gt; soup.findAll('span',{'class':'badgecount'})
[&lt;span class="badgecount"&gt;9&lt;/span&gt;, &lt;span class="badgecount"&gt;23&lt;/span&gt;, &lt;span class="badgecount"&gt;51&lt;/span&gt;, &lt;span class="badgecount"&gt;8&lt;/span&gt;, &lt;span class="badgecount"&gt;40&lt;/span&gt;, &lt;span class="badgecount"&gt;83&lt;/span&gt;, &lt;span class="badgecount"&gt;20&lt;/span&gt;, &lt;span class="badgecount"&gt;88&lt;/span&gt;, &lt;span class="badgecount"&gt;104&lt;/span&gt;, &lt;span class="badgecount"&gt;3&lt;/span&gt;, &lt;span class="badgecount"&gt;22&lt;/span&gt;, &lt;span class="badgecount"&gt;39&lt;/span&gt;, &lt;span class="badgecount"&gt;1&lt;/span&gt;, &lt;span class="badgecount"&gt;12&lt;/span&gt;, &lt;span class="badgecount"&gt;45&lt;/span&gt;]
&gt;&gt;&gt; spans=soup.findAll('span',{'class':'badgecount'})
&gt;&gt;&gt; for span in spans:
    print span.text


9
23
51
8
40
83
20
88
104
3
22
39
1
12
45
</code></pre>

python html parsing beautifulsoup