Download webpage image

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Office Smith
Newbie
Posts: 15
Joined: Fri Sep 21, 2012 5:17 pm
Location: Phoenix, AZ

Download webpage image

Post by Office Smith » Mon Jul 20, 2015 5:53 pm

Does someone have a code snipet I can use to download an image on a webpage? I'm not looking to capture it, but actually download the image itself.

Thanks!

User avatar
JRL
Automation Wizard
Posts: 3504
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Download webpage image

Post by JRL » Tue Jul 21, 2015 2:46 am

A snippet to retrieve the Macro Scheduler logo.

Code: Select all

HTTPRequest>https://www.mjtnet.com/images/macroscheduler_logo.png,%desktop_dir%\macroscheduler_logo.png,GET,,,,,,

23ohagan
Newbie
Posts: 12
Joined: Tue Feb 09, 2016 6:05 pm

Re: Download webpage image

Post by 23ohagan » Sun Apr 03, 2016 2:22 am

JRL wrote:A snippet to retrieve the Macro Scheduler logo.

Code: Select all

HTTPRequest>https://www.mjtnet.com/images/macroscheduler_logo.png,%desktop_dir%\macroscheduler_logo.png,GET,,,,,,
Is the GET,,,,,,,,,, suppose to be like that or is something suppose to go there .
. I feel silly. I found it in the help files. Thanks
Last edited by 23ohagan on Sun Apr 03, 2016 1:31 pm, edited 2 times in total.
Using:
MS 14.2.07 (regular)
Windows 7
Browser: Chrome

23ohagan
Newbie
Posts: 12
Joined: Tue Feb 09, 2016 6:05 pm

Re: Download webpage image

Post by 23ohagan » Sun Apr 03, 2016 1:28 pm

How would you go about downloading (GET) an image that is a popup (not stored on the site you are currently on?

For example, say I am at url http://www.siteiamvisiting.com and a pop up appears and I want to downlonload the image on that pop up, but the image is from http://www.theimageishere.com/r=(this part changes each new pop up).jpg

I want to download and save the image as "share.jpg"

Id this correct?

Code: Select all

HTTPRequest>http://www.theimageishere.com/r=*,C:\Temp\share.jpg,GET
Using:
MS 14.2.07 (regular)
Windows 7
Browser: Chrome

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Download webpage image

Post by Marcus Tettmar » Tue Apr 05, 2016 10:32 am

It requires a couple more parms:

HTTPRequest>http://www.theimageishere.com/r=*,C:\Te ... httpResult

Is http://www.theimageishere.com/r=* a valid URL? Looks odd to me. You will need a valid URL pointing to the resource you want to download.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts