I'm trying to scrape an Australian retailer "JB HI-FI".
from requests import get
from bs4 import BeautifulSoup
url = 'https://www.jbhifi.com.au/?q=a&hPP=36&idx=shopify_products&p=1'
response = get(url)
print(response.text)
html_soup = BeautifulSoup(response.text, 'html.parser')
type(html_soup)`
movie_containers = html_soup.find_all('div', class_ = 'ais-infinite-hits ais-results-as-block')
print(type(movie_containers))
print(len(movie_containers))`
Then I just got 0 for the length. But I can clearly see 'ais-infinite-hits ais-results-as-block' by using "inspect" from google chrome
Aucun commentaire:
Enregistrer un commentaire