O
O
OneKing2021-02-10 07:12:23
Python
OneKing, 2021-02-10 07:12:23

How to parse data from style object, Python, BS4?

Good day everyone, the question is, you need to extract the data 60235a6822df2180360850.png
At the same time, I don’t understand why bs4 can’t extract, and even find the necessary data.
about_product_info = soup_detail_info.find('div', class_="ty-product-feature__label") - doesn't work, can't find required items.
In general, it does not work, unload the characteristics of the goods.
I ask for help, give at least an example in order to look.

Here is a piece of code, what am I doing wrong gentlemen?
https://codepen.io/jixam58931-hrandod-com/pen/abBmWZr

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-02-10
@OneKing

j = json.loads(response.text) # Загружаем ответ от requests
html = j['html']['sv-product-tabs-ajax-download'] # Достаем html
soup = BeautifulSoup(html,'lxml')

# Далее все стандартно

about_product_info = soup_detail_info.find('div', class_="ty-product-feature__label") - doesn't work, can't find required items.

And you will not find divs with such a class, because there is a span .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question