Refresh Datatable and Check if there is a New Entry

Hi all,

I have a webpage and I need to refresh the web page at a given interval and scrape the content. If there are new items in the datatable in the web page, I want to send out the datarow via email.

The solution I can think of is to scrape the first instance then combine it with the new ones. Then combine the datatable and lastly remove the duplicates.

Although for some reason the 1st and 2nd rows still have duplicates.

I’m using the below method to remove my duplicates

Assign

Customer=CustomerTable.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(“Lead ID”)).Select(Function(b) b.First).CopyToDataTable()

Hi! Do you have any solution for this topic?

Hi @merve5

May u can do this way

  1. First scrape the datatable and store in one one excel let’s say excel1

  2. After a instance u are scrapping datatable again to get new data and put in excel2 file

  3. Now compare both files and take the unique one out of it using linq query

  4. If the unique data is available, then send a mail to containing that data row

  5. After sending the email , remove the data from the excel1 and overwrite with data of excel2 and clear the excel2 too

Hope the above helps you

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed::relaxed:

1 Like