Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Forum rulesBefore 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:

My current problem:
AJAX is becoming more and more a technology, which is used in todays web applications.
This means that filling out a form and sending it will not require to reload a page. New content can be displayed, without reloading the whole site. Google for example already use it.
For those who dont know what i mean may have a look at wikipedia.
Here is an online example: http://onlyonline.co.uk/simpleajaxexample/showtime.html

And this is my problem atm too.
Im filling out a form, and the information which i want to extract is the result page. As the page wont be really reloaded, i cant easily save it, because it does not wait for the result content, within the page. So my current solution is, to set a WAIT SECONDS=10, which sucks. Cuz when the page needs just 2 seconds for loading, its a mess of time, and when it needs 20 seconds, i have no result page infos at all.

(1) Wait for the text to appear. In our case we wait for the words "Time now" to appear. This indicates that the page was updated. A simple TAG command is sufficient for this: If a TAG command can not find its attribute on the web page the TAG command goes in "LoadCheck" mode and waits for 6 seconds (1/10 of the TIMEOUT value) until the word "Time now" appears. Once the words are found on the page, the macro continues and extracts the time.

(2) Wait for an image to change or appear (In this example the image of the word "Time now"): This can be done with the IMAGESEARCH command. This command will wait until it "sees" that the new data arrived. Just like a human user would do. For more information about IMAGESEARCH please see http://www.iopus.com/imacros/help/ir_fl ... xample.htm

I am working on a similar project, but I'm trying to extract a DIV instead of H2 that initially is blank. I can only get it to work using the WAIT command (not a big deal). However since with version 6.0 EXTRACT is no longer supported, how do I get this to work with the TAG command?

(1) Wait for the text to appear. In our case we wait for the words "Time now" to appear. This indicates that the page was updated. A simple TAG command is sufficient for this: If a TAG command can not find its attribute on the web page the TAG command goes in "LoadCheck" mode and waits for 6 seconds (1/10 of the TIMEOUT value) until the word "Time now" appears. Once the words are found on the page, the macro continues and extracts the time.

(2) Wait for an image to change or appear (In this example the image of the word "Time now"): This can be done with the IMAGESEARCH command. This command will wait until it "sees" that the new data arrived. Just like a human user would do. For more information about IMAGESEARCH please see http://www.iopus.com/imacros/help/ir_fl ... xample.htm

it doesn't work
the script is simply jump the ligne TAG POS=1 TYPE=H2 ATTR=TXT:*Time<SP>now* without waiting for the timeout
i'm setting errorignore to yes because i don't want to stop the script while error occured

Thank you for all the information posted here. It has been very useful for me.

However, I am facing a different problem at the moment. The webpage I am doing a macro for, has a AJAX component that can take either 3, 10 or 20+ minutes processing (because the request goes for a queue so the waiting time is quite random).

There is a string I can use for identifying when the process has been completed, which is:
TAG POS=1 TYPE=SPAN ATTR=TXT:*Finished*

However, this won't work well because this test is performed after 6 seconds. As 6 seconds is not enough for processing my AJAX request, it will always fail and stop the processing of the macro.

In case this test fails, is there any way to keep repeating it until it succeeds?