truncated is in div tags therefore the list of products is empty even if you change it from span. For price the following works:
If you like this then please like the findall video at https://youtu.be/YCSPhLOMPFM
def web_scrape (): html = u.urlopen("https://www.amazon.com.au/gp/bestsellers/videogames/") html_contents = html.read().decode() htmlPrices = re.compile('sc-price[^\>]*\>(.*?)\<\/span\>') prices = re.findall(htmlPrices, html_contents) print(prices)Don't forget the .*? or you will end up with everything!
If you like this then please like the findall video at https://youtu.be/YCSPhLOMPFM