Help needed with saving image from url

Hello All,

I am trying to save images from https://picsum.photos/1024/1024/?random

on visiting this site it directs you to https://picsum.photos/1024/1024/?image=392

the image number is generated randomly on the website.

What I am trying to do is save the image with the filename as the number mentioned in the URL. I am a little lost here, can anyone help?

@VirajN,

Use click activity and select right for mouse button under input in properties and then save image.

If I do right click and save, the image is saved as download.jpeg

I want to save it as x.jpeg where x is the number mentioned in the URL.

Hi @VirajN,

Refer the below workflow and change the path where you want to save the files in Type into activity

Test (3).xaml (24.5 KB)

Hello @VirajN,

Please use below regex to fetch a last digits from URL,
(\d+)(?!.*\d)

you can type that number while you save.

Thanks,
Pankaj

I am trying to download the regex activity but not able to find it. Can you help me here?

You will need to use Matches activity for this.

this is what exactly i needed … however it saves the entire web archive instead of the jpeg file when we do ctrl + s on IE. and on chrome it doesnt allow the selector to select the address bar

Can you help here?

Hi @VirajN,

Refer the below workflow for saving as image

Test (3) (2).xaml (31.7 KB)

1 Like

Thank you @anil5 this indeed works like a charm … thanks once again :slight_smile:

Thanks for sharing, however it saves the entire web archive instead of the jpeg file when we do ctrl + s on IE. Hence this workflow will not help me with my current situation.

Thanks for helping :slight_smile:

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