BeautifulSoup выдает "[]" вместо искомых тегов при парсинге
Из всех что есть на этом сайте овтетов перепробывал все итог один
import requests
from bs4 import BeautifulSoup
import re
URL = 'https://auto.ru/sankt-peterburg/cars/honda/used/'
HEADERS = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36' ,
'accept': '*/*'
}
def get_html(url, params=None) :
r = requests.get(url, headers=HEADERS, params=params)
return r
def get_content(html) :
soup = BeautifulSoup(html, 'html.parser')
items = soup.find_all( 'div',class_='ListingItem')
print(items)
def parse() :
html = get_html(URL)
if html.status_code == 200:
get_content(html.text.encode('utf-8'))
else:
print('Error')
parse()