C
C
CeBePHblY2021-11-26 11:12:01
beautiful soup
CeBePHblY, 2021-11-26 11:12:01

Why can't BeautifulSoup extract tags from html?

BeautifulSoup pulls everything up to a certain point. On one page, he needs to find a div with the class part_box, and he finds them, but he cannot find the content tags in these divs. Code div class part_box below:

<div class="part_box">
<div class="part_brand" style="display:none;">QUINTON HAZELL</div>
<div class="part_article_id" style="display:none;">QBK395</div>
<div class="part_name pointer" onclick="document.location.href = '/part/qbk395/quinton_hazell/'; return false;">
                                Комплект ГРМ на Acura Legend: <span class="part_article">QUINTON HAZELL QBK395</span>
</div>
<div class="pointer part-box-image-wrapper" onclick="document.location.href = '/part/qbk395/quinton_hazell/'; return false;">
<div class="part_img">
<a class="pointer" href="/part/qbk395/quinton_hazell/">
<img alt="Комплект ГРМ QUINTON HAZELL QBK395" class="lazyload" data-src="https://static.ukrparts.com.ua/media/images/57/00572281703255.jpg" t
itle="Комплект ГРМ QUINTON HAZELL QBK395" width=""/>
</a>
</div>
</div>
<div class="part_footer">
<div class="price_and_buy">
<div class="pull-right" style="padding-bottom: 10px;">
<span class="weight-medium">Скоро будет</span>
</div>
<div class="clearfix"></div>
<div class="danger"></div>
</div>
<div class="part_info">
<ul>
<li><span class="weight-medium">входящие в состав ролики</span>: 1</li> </ul>
</div>
</div>
</div>

This is what it gets from each div with class part_box, but nested elements it can't parse. Why and how to solve it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question