How to do Data Scraping from amazon for different products when display changes for different products

I need to scrap product name and its price for any product given by customer. When I give first product the display for that was horizontal, one below other. For the next product, it was 5 products in each row. How do we cater Uipath for such difference in displays? Kindly help please

Can you lost the picture of Webpage that you want to scrap?