Data Scraping when the search result changes from rows to Columns format & Vice-Versa dynamically

Hey,
I am trying to scrape some data from Amazon using data scraping. Basically, i have a list of products in my excel. i need to go to amazon,search for each product,collect the name & url for each of the search results,then open each result by navigating to the scraped url & finally get some data for that particular product. its pretty straight forward. I am done with all these steps,already.

My problem is when i am searching for a product lets say, “t shirts for women” with categories set to All…The search results appears in rows something like this:

But then,when i am searching for the next product, lets say; apple watch series 3…The result comes in column format…Like this:

2%20Columns

so, you see when i am trying data scraping; it works only either one of them. I need a way to scrape the data no matter how the search result format is. any ideas will be highly appreciated!!

Thanks a ton in advance!!

In the foundation course, it is clearly explained the data scraping works if the search data has a similar pattern.

In your case you have two patterns. I suggest you to record both patterns and create two workflows; one for each pattern.

Get the selector for element that is unique for one pattern. Use Element Exists activity. Based on the element found, trigger the matched pattern workflow.

Regards,
Karthik Byggari