Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective
November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of
FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the
iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:
CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
-
steph93
- Posts: 1
- Joined: Tue Nov 09, 2010 11:19 am
Post
by steph93 » Tue Nov 09, 2010 11:58 am
Hello,
I've made a script imacros to download automatically images on Flick r.
My firts picture is well downloaded but not the second one ...
Code: Select all
VERSION BUILD=7021019 RECORDER=FX
TAB T=1
URL GOTO=http://www.flickr.com/photos/gmprod/1923114387/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS
TAB T=1
URL GOTO=http://www.flickr.com/photos/emvri85/4725813424/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS
TAB T=1
URL GOTO=http://www.flickr.com/photos/cromagnondepeyrignac/3583119107/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS
The bug :
RuntimeError: element IMG specified by SRC:{{!VAR1}} was not found, line: 15
I tried to change the second and third !VAR by !VAR2 and !VAR3 but there is no change
Can you help me please ?
-
CodeLab
- Posts: 100
- Joined: Sun Dec 27, 2009 5:50 pm
Post
by CodeLab » Tue Nov 09, 2010 4:16 pm
Hi...
Everytime You Extract Something Using
EXTRACT=HREF|TXT|anything
New Value Is
"Appended" To Extract Variable...
You Should
SET !EXTRACT NULL
After Every Image Is Saved....
So For Instance Your Code Should Be Like This...
Code: Select all
VERSION BUILD=7021019 RECORDER=FX
TAB T=1
URL GOTO=http://www.flickr.com/photos/gmprod/1923114387/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS
'Set Extract As Null Here
SET !EXTRACT NULL
TAB T=1
URL GOTO=http://www.flickr.com/photos/emvri85/4725813424/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS
'Again Set Extract As Null
SET !EXTRACT NULL
TAB T=1
URL GOTO=http://www.flickr.com/photos/cromagnondepeyrignac/3583119107/sizes/m/
TAG POS=1 TYPE=IMG ATTR=SRC:http://farm* EXTRACT=HREF
SET !VAR1 {{!EXTRACT}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
WAIT SECONDS=2
TAG POS=1 TYPE=IMG ATTR=SRC:{{!VAR1}} CONTENT=EVENT:SAVEPICTUREAS