K
K
Killir Vanya2292021-11-05 20:21:37
Python
Killir Vanya229, 2021-11-05 20:21:37

How can I take the text of two identical BeautifulSoup4 classes separately?

I want to get the text separately from the text-success classes, on the image the text that needs to be displayed is +54 and +4,150, how can this be done by code? I think this can somehow be done by looking at the id, but I couldn't figure it out.

618567b467375257802766.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-05
@VEYREN

soup.find('span', {'id': 'mainDaily'}).text
https://www.crummy.com/software/BeautifulSoup/bs4/doc/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question