Answer the question
In order to leave comments, you need to log in
How to get text from div using beautifulSoup?
<div class="amount">
1271
</div>
full_page = requests.get(self.DOLLAR_RUB, headers=self.headers)
# Разбираем через BeautifulSoup
soup = BeautifulSoup(full_page.content, 'html.parser')
# Получаем нужное для нас значение и возвращаем его
self.convert = soup.findAll("div", {"class": "amount "})
print(self.convert)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question