Home>

I need to get a list of links for all product cards with. But I don't see them in the soup variable

Why is this happening and what needs to be done to get them?

Here is my code:

import requests
from bs4 import BeautifulSoup
URL= 'https://www.wildberries.ru/catalog/0/search.aspx?search=loop + points'
HEADERS= {'Accept': 'text /html, application /xhtml + xml, application /xml; q= 0.9, image /avif, image /webp, image /apng, * /*; q= 0.8, application /signed-exchange; v= b3; q= 0.9 ',
            'user-agent': 'Mozilla /5.0 (Windows NT 10.0; Win64; x64) AppleWebKit /537.36 (KHTML, like Gecko) Chrome /89.0.4389.82 Safari /537.36'}
response= requests.get (URL, headers= HEADERS)
soup= BeautifulSoup (response.text, 'html.parser')
for link in soup.find_all ('a'):
    print (link.get ('href'))

Make a request and save the response to an html document. Well, then look, maybe you get a blank page.

ProgerOffline2021-11-15 19:09:10

A dynamic site cannot be parsed with such a honeycomb. Dig towards Selenium.

Сергей Шашко2021-11-15 19:09:10