lists = soup.find_all('div',class_="s-main-slot s-result-list s-search-results sg-row")
Look at the returned HTML - there is only one
<div class="s-main-slot ...">
Your code loops over that one element, and finds the first name and price spans within the entire list.
Change your code to find all
<div class="s-result-item ...">
items instead, and you might have better luck:
lists = soup.select("div.s-result-item") NB:
, since you can't specify the full
attribute, as it changes for each element.
Alternatively, use the
attribute to find the search result items:
lists = soup.select('div[data-component-type="s-search-result"]')