Extraction Fails, Halts Calling Macro

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
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
Post Reply
danhinz
Posts: 22
Joined: Mon May 07, 2007 5:48 pm

Extraction Fails, Halts Calling Macro

Post by danhinz » Fri Feb 29, 2008 8:01 pm

Looking for help/ideas Please

extracting data from a table. I'm using all relative tags because the data that comes back is not always present. I look for the "DataName" cell and then get the data from the next table cell (R1 extraction). Max pieces of data is 4 per record.

Problem is that if it doesn't find the "DataName" instead of getting an EANF I am getting an error that shows in the iMacros browser as "Error in Line X:" I know the line is OK because the previous records all had that data element and successfully retrieved it. Nothing is stored to the data holder to go back to the calling VBA routine.

The calling routine expects to get back 4 pieces of data and when it isn't I get a subscript out of range error... iMacros code is below. The variable takes the form of

http://sccaseinfo.org/pa5.asp?full_case ... -PR-162683
(successful extraction)
http://sccaseinfo.org/pa5.asp?full_case ... -PR-162801
(extraction fails)

Code: Select all

VERSION BUILD=6110122     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO={{casenumber}}
TAG POS=1 TYPE=TD ATTR=TXT:*Petitioner*   
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT  
TAG POS=1 TYPE=TD ATTR=TXT:*Decedent*   
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT  
TAG POS=1 TYPE=TD ATTR=TXT:*Attorney*   
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT  
TAG POS=1 TYPE=TD ATTR=TXT:*Also<SP>Known<SP>As*   
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT  
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Thu Mar 06, 2008 4:59 pm

Please add

Code: Select all

SET !ERRORIGNORE YES
so the macro continues. Does this solve the issue?
danhinz
Posts: 22
Joined: Mon May 07, 2007 5:48 pm

Partial Solution

Post by danhinz » Fri Mar 07, 2008 2:59 pm

That does allow the macro to keep processing, but now the extraction retrieves incorrect data instead of nothing...
Post Reply