HOW TO stop imacros from loading the entire page ?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderator: iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

HOW TO stop imacros from loading the entire page ?

by viao123 on Tue Apr 19, 2011 9:47 pm

Hi,

I have a script basically goes to a page and extract a string and the moves on to do other stuff, problem is imacros tries to load the entire page (images, script, tracker etc) rather than just loads up to the TAG part where I want it to extract text. Even if the text I want to extract is already loaded in the browser, imacros is still loading the page, which is entirely unnecessarily and waste some 10-20 seconds when you are on a proxy.

Sometimes it is also timed out because some irrelevant javascripts on the page doesn't load, but obviously the text which I wanted to extract is already loaded in the browser.

So is there a way to make imacos only load pages up to the TAG part ????


Code: Select all
SET !TIMEOUT_PAGE 30
SET !ERRORIGNORE NO
TAB T=1
FILTER TYPE=IMAGES STATUS=ON
URL GOTO=[URL1]
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In EXTRACT=TXT
URL GOTO=[URL2]
TAG POS=1 TYPE=IMG ATTR=SRC:blah
PROMPT Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:doc_register_form ATTR=ID:captcha_code CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:doc_register_form ATTR=ID:username EXTRACT=TXT
TAG POS=2 TYPE=A ATTR=TXT:Register
'New Page URL3
TAG POS=1 TYPE=A ATTR=TXT:confirmation<SP>message EXTRACT=TXT
viao123
 
Posts: 1
Joined: Tue Apr 19, 2011 9:29 pm

Re: HOW TO stop imacros from loading the entire page ?

by Tom, Tech Support on Fri Apr 29, 2011 9:34 am

Hello viao,

Here's what I would try:

Code: Select all
TAB T=1
FILTER TYPE=IMAGES STATUS=ON
SET !TIMEOUT_PAGE 1
SET !TIMEOUT_TAG 30
SET !ERRORIGNORE YES
URL GOTO=[URL1]
SET !ERRORIGNORE NO
TAG POS=1 TYPE=A ATTR=TXT:Sign<SP>In EXTRACT=TXT
URL GOTO=[URL2]
TAG POS=1 TYPE=IMG ATTR=SRC:blah
PROMPT Captcha !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:doc_register_form ATTR=ID:captcha_code CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:doc_register_form ATTR=ID:username EXTRACT=TXT
TAG POS=2 TYPE=A ATTR=TXT:Register
'New Page URL3
TAG POS=1 TYPE=A ATTR=TXT:confirmation<SP>message EXTRACT=TXT

I've set a low timeout for the page to load which will cause URL GOTO to only wait 1 second and then error out (hence the !ERRORIGNORE commands before and after the URL GOTO).

I set a larger value for !TIMEOUT_TAG, which is the amount of time iMacros waits for each TAG command to find the element.
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3080
Joined: Mon May 31, 2010 9:59 am


Return to General Support & Discussions

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Website Monitoring