Question

So, here is my code:

VERSION BUILD=7401110 RECORDER=CR

SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES

TAB T=1 
SET !LOOP 10000
URL GOTO=https://a/a/as/9000{{!LOOP}}.jpg
SAVEAS TYPE=PNG FOLDER=* FILE=Time_{{!NOW:yyyymmdd_hhnnss}}.png 

It cycles through tons of links and saves each web page to my downloads folder in iMacros. But how do I make it so it only downloads web pages that download successfully? In example, webpages that don't give me a "HTTP 404 Not Found" error.

Also, right now it only saves the picture on the web page, and I need the URL as well. Is there a way that the picture and the URL can be saved together in the same file? Like a screen shot of the PC screen or something? Or maybe even saving the URL as the file name.

Thanks a ton!

-Cashe

Was it helpful?

Solution

imacros can screenshot only browser active area without address bar.

you can get current url using {{!URLCURRENT}} http://wiki.imacros.net/!URLCURRENT

since there is no IF statement in imacros you'll need to use javascript or similar for that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top