Hello, I’ve been having trouble with an aspect of data scraping.
The process as a whole is basically:
Reading a list of product references from an excel column
Navigating to a website
Writing the reference in the search field to reach the product page
Extracting an irregular number of image links from the website with data scraping, which are written down in a different excel sheet
The process is running fine, but my issue is that I need a way to associate these links with the product reference (in order to know what product they belong to), for example by writing the reference next to each link.
However, I don’t know a way to make a counter based on the number of scraped elements (or any other alternative). Is there a way to achieve this?
Yes, exactly. Since the number of scraped items is different for every new webpage, I don’t know how to write down the correct reference next to each one.
The reference is the row which you are passing to search and scrap right. Hope you are saving the scrape data into your custom table example dtTable. when you build datatable at that time only create a new column “ReferenceData” . After the scrape open a “for each row in DataTable” and assign the reference value to this this column.
Eg:
referencedata = row(“SearchValue”).tostring
In for each loop
assign activity
row(“ReferenceData”) = referencedata .
All these action should be inside your main iterator loop.
Thank you for your help, I tried implementing your advice, but I don’t think I am doing it properly, could you please take a look at the files I am using directly?
Thanks a lot! I’ve had very little experience with UiPath so far, but the workflow was working as far as extracting the image links and writing them down.
I will try your solution and let you know if I encounter any other issues.