У меня есть код:
import httpx
from bs4 import BeautifulSoup
import re
cl = httpx.Client(http2=True, http1=True)
request = cl.get(
url='https://bscscan.com/address/0x8263d79d89d411d1002afe2cf0c8b2e549b8e125').text
soup = BeautifulSoup(request, 'lxml')
balance = soup.find('a', class_="btn btn-xs btn-custom btn-custom-balance dropdown-toggle")
print(balance)
Он выводит вот такой ответ:
<a aria-controls="basicDropdownClick" aria-expanded="false" aria-haspopup="true" class="btn btn-xs btn-custom btn-custom-balance dropdown-toggle" data-unfold-animation-in="slideInUp" data-unfold-animation-out="fadeOut" data-unfold-delay="300" data-unfold-duration="300" data-unfold-hide-on-scroll="false" data-unfold-target="#availableBalanceClick" data-unfold-type="css-animation" href="javascript:;" id="availableBalanceDropdown" role="button">
$26.99
<span class="badge badge-primary mx-1" data-toggle="tooltip" title="1 Token Contract">1</span>
</a>
Как мне с ответа получить '$26.99'?