I'm using Beautiful Soup to get the results of products from amazon.
Below is my code:
import bs4
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
amazon_url = "https://www.amazon.co.uk/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=chromebook"
uClient = uReq(amazon_url)
page_html = uClient.read()
uClient.close()
page_soup = soup(page_html, "html.parser")
containers = page_soup.findAll("div", {"class":"s-item-container"})
print(len(containers))
However, this is printing 16
items when there are 30
items on that page.
Why is that?
Any help would be appreciated.