How to download different pdf files from different urls

Hi all,

I used data scrapping for downloading pdf files from url but everytime its taking

same file.
Everytime the url’s will be changing as well as the filename will be changing.
If the file name ends with “* SFR” that file needs to be downloaded.
I am able to download only 1st url file. Every time am downloading same file.
What changes I need to do.

Please help me. Thanks

Regards,
Lakshmi

Hey!

You’re saying that the URL’s are Dynamic. From where you’re getting this URL’S?

Regards,
NaNi

@THIRU_NANI
Here we have some 6 digits number in excel file eg. 225823 When i type this number in search box

We get this list of files. file name ends with “* sfr.pdf” needs to be download.

@THIRU_NANI
Yes the url’s are dynamic.

Hi!

Could you please explain the process bit a more?

I mean from where you’re getting the URL’s? Is it from excel ?

Regards,
NaNi

Hi @THIRU_NANI ,

image
here number is typed from excel
After clicking search button
image
click on this
We get list of files.

Highlighted file needs to be downloaded,
Every time file url for pdf’s will be changing and also imagethis number also changing.

Thanks,
Lakshmi

Hey!

Use Get Full Text and paste the data here!

Will give you the regex pass this variable to click activity…

Why RegEx bcz we have to download the file which ends with SFR correct!

So this will directly get the SFR and click on that file to download

Let’s try this

Regards,
NaNi

hi,

get full text’s output needs to be stored into text file right.

Hey!

As of now stored it in text file using append Line…

Then will change it to different…

Regards,
NaNi

Hey !

Try this

System.Text.RegularExpressions.RegEx.Match(InputVariable,"[A-Z].[A-Z]\d+.SFR").ToString

Try this and let me know

Regards,
NaNi

1 Like

Hi,


where to store the output variable
image

Thanks,
Lakshmi

hi,

Expression returning blank-
image

regards,
lakshmi

Hey!

Use click activity and indicate it on any pdf file that you want to download…

Open this with uiexplorer and take the aaname if found

And replace aaname with REGEX thing

Regards,
NaNi

Hi,
image
Tried out its returning blank in message box error in selector of click
image
What changes i need to do.

Thanks,
Lakshmi

Change the parent id to *

Regards,
NaNi

Hi,


Regular expression returning empty.
Error in click

Hi @THIRU_NANI ,

Get full text was not working so i used data scrapping now its working only for one file name but in excel after performing data scrapping it is taking the previous filenames in excel even after using delete range.

What changes i need to do.

Regards,
Lakshmi

Hey!

Use clear Data table and pass the data table variable…

Regards,
NaNi

1 Like

Hi @THIRU_NANI ,

Thanks a lot for helping. Data table cleared and data scrapping perfectly.

Thanks & Regards,
Lakshmi

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.