browser.get('https://b2blk.megafon.ru/account/accountInfo/1218****')
time.sleep(2)
text = bs4.BeautifulSoup(browser.page_source)
time.sleep(2)
cash = text.select('.money')[0].getText()
time.sleep(2)
browser.close()
return 'MEG_balance: ' + cash + '\n'
#!/usr/bin/env python3
import requests
from bs4 import BeautifulSoup
html = '<span class="content"><div class="ng-star-inserted">2 390,00 r</div></span>'
soup = BeautifulSoup(html, 'html.parser')
cash = soup.find('span', attrs = {'class':'content'}).find('div', attrs = {'class':'ng-star-inserted'}).get_text().strip()
print(cash)