I am using BeautifulSoup4 to build a script that does financial calculations. I have successfully extracted data to a list, but only need the float numbers from the elements.
For Example:
Volume = soup.find_all('td', {'class':'text-success'})
print (Volume)
This gives me the list output of:
[<td class="text-success">+1.3 LTC</td>, <td class="text- success">+5.49<span class="muteds">340788</span> LTC</td>, <td class="text-success">+1.3 LTC</td>,]
I want it to become:
[1.3, 5.49, 1.3]
How can I do this?
Thank-you so much for reading my post I greatly appreciate any help I can get.