Scarping question on Spotify

Hey!

Do you have any suggestions for gathering data in a single Excel cell (.tostring), displaying the most recently updated song date from a Spotify playlist? For example, in screenshot we can see that latest update was 3 days ago, so I need that in excel cell is “3 days ago”. I am now using Extract Table data activity that gives all column of dates. Basically I need that UiPath find latest update and scrap out it in Excell cell.

Hi @Chris_Balance ! :smile:

Sure, so if I understand you already have a datatable right ?
Could you please send us your xaml file to add some code in it using your variables ?
I would suggest a LINQ query on your datatable to get the most recent date, then to select that date and convert it to string text so you could copy it on a specific cell.

image
I have this kind of table

You gotta apply a logic where you would have to loop through the data table and then check for keywords such as week and day in a switch case, then get the number written in the row, for example
first row: 4 weeks ago,
switch
case week:
use an assign activity and replace the row value to Now.AddDays(-7*Cint(currentRow(“New column 0”).toString.ToLower.Split({“week”},StringSplitOptions.None)(0).Trim))
you’ll get a tentative date which you can use in calculations.

or another option is before scraping check if you’re able to hover over 4 weeks ago and get the date, if so you just have to identify the attribute and pass it in metadata inside Extract Structure Data activity

Thanks

1 Like

Please check your DM

Did you get the data already?
Your job now is to find the nearest date
right?