F
F
Freeshca2022-02-06 19:17:30
Python
Freeshca, 2022-02-06 19:17:30

How to get text from this piece of html using python selenium/bs4?

You need to get the text Option 1: 50,000; Option 2: 6,250, Option 1: 25,000; Option 2: 12,500, Option 1: 10,000; Option 2: 7,500 from this html. I will be very grateful for the provided solution.61fff497a03de161791967.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
L3n1n228, 2022-02-10
@L3n1n228

import requests
from bs4 import BeautifulSoup

#парсер
url = 'url сайта'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'lxml')
quotes1 = soup.find_all('div', class_='c-input-group')

#очистка до текста
for quote in quotes1:
    a = (quote.text)

print(a)

Should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question