Красивый суп, не способный выбросить все html элементов - PullRequest
0 голосов
/ 18 июня 2020

Пробую красивый суп для извлечения элементов из https://www.flipkart.com/. когда я пытался распечатать все элементы h2, используя код:

```
for h2_tag in soup1.find_all("h2"):
    print(h2_tag)
```

<h2 class="puxlXr">Father's Day Special Gifts</h2>
<h2 class="puxlXr">Best of Appliances </h2>
<h2 class="puxlXr">Top Deals on Electronics</h2>
<h2>Flipkart Plus</h2>
<h2>No Cost EMI</h2>
<h2>EMI on Debit Cards</h2>
<h2>Mobile Exchange Offers</h2>
<h2>What Can You Buy From Flipkart?</h2>
<h2>Mobile Phones</h2>
<h2>Electronic Devices and Accessories</h2>
<h2>Large Appliances</h2>
<h2>Small Home Appliances</h2>
<h2>Lifestyle</h2>
<h2>Home and Furniture</h2>
<h2>Baby and Kids</h2>
<h2>Books, Sports and Games</h2>
<h2>Grocery/Supermart</h2>

Некоторые элементы, которые я вижу в Интернете, здесь отсутствуют. Что делать, чтобы получить все элементы.

...