Welcome to openkapow Sign in | Join
in Search
.

avoiding an irregular tag

Last post 07-26-2007, 11:31 AM by tyler. 4 replies.
Sort Posts: Previous Next
  •  12-30-2006, 9:55 PM 7241

    avoiding an irregular tag

    Hi,

    I really need help. There were 3 tags i wanted to avoid during iteration of the robot when
    looping. So i set the 'First tag number' and the 'last tag number' in the action tab
    for the 'For each..' accordingly, so as to avoid them during iteration. The problem is that
    when looping through the pages, a 4th tag which i would also like to avoid, appears just once.
    Obviously this stops the robot and generates an error. How can i avoid this 4th tag
    which appears just once, not just on that particular page but throughout other pages too?
    i cannot use the 'First tag number' and 'Last tag number' because this 4th tag just appears
    2 or three times...

     Thank you in advance,

     Cyrus

    Filed under: ,
  •  12-31-2006, 10:39 PM 7245 in reply to 7241

    Re: avoiding an irregular tag

    Cyrus,

    The openkapow RoboMaker provides you with all the controls you should ever need to overcome issues with irregular tags (and often very bad HTML) and essentially "pre-cleanse" the page before or during robot processing. In this instance, you can insert a "Hide Tag" step inside your For Each loop to hide the irregular tag before continuing on with other steps (i.e. Extracts). To ensure that the robot does not generate an error when the irregular tag is not found, change the "Own Errors" under Error Handling for the Hide Tag step from "Report Here" to "Ignore and Go to Next Step". You can also completely remove any tag with the Remove Tag step, but this is not generally advised if there's any chance this could mess up a JavaScript within the page.

    Hope this gets you back on track. Happy roboting (and New Year!)...

    Al.

     

  •  01-01-2007, 10:48 PM 7255 in reply to 7245

    Re: avoiding an irregular tag

    hi,

    Thank you very much for your answer (And Happy New Year to you and to your family too Al.). I have tried inserting a 'Hide Tag' step (which i placed after the 'For Each' step and before 'extract value 1' step) and also setting the "Own Errors'' to "Ignore and Go to Next Step", just as explained. But the robot still stops at the same point in the loop, and still generates the same error. As far as i can see the problem is that the tag in question is a regular tag, it just appears in a different place than usual. In other words, the place in the loop sequence where the extract tag would normally be, is replaced by this other tag, in the sequence. Therefore, even if i hide this tag, the robot continues looping and extracting in its programmed sequence ( extract-skip-skip-skip-extract-skip-skip-skip...etc) but the normal order of tags has been shifted. An ideal solution would be to suddenly change the looping sequence to adapt to the new order, but i can't do that. I have uploaded the robot as it stands now, so you (or anybody) can have a look http://openkapow.com/files/folders/searching/entry7254.aspx (all that has to be done is to click on run in the debugger and wait for the error). I really appreciate the help, i really need to get this project finished. Thanks again,

    Cyrus

  •  01-02-2007, 2:54 PM 7276 in reply to 7255

    Re: avoiding an irregular tag

    Cyrus,

    I have posted Gelbeseiten 3 under my account "allaf". To avoid the regular tag in question (that did not contain any address or phone information), I simply added an Error Handling condition to "Ignore and Skip Branch" to the first extract step. Hopefully that will be satisfactory for you. I also added some Converters to the Extract steps to cleanse the Address fields and Telephone. I also handle the special case where a City but no address is displayed. Finally, I modified the Click > step to Ignore and Skip Branch to handle the condition where there are no more pages available to loop through.

    Hope this addresses your current needs. Please feel free to download and re-publish under your account with whatever further changes may be required as well as a full service description and tags.

    Regards, Al. 

  •  07-26-2007, 11:31 AM 12152 in reply to 7255

    Re: avoiding an irregular tag

    Cyrus,

    I'm running into the exact same problem.  Did you figure out a good solution?

     

    Thanks,

    Tyler

View as RSS news feed in XML
.
Copyright 2006, 2007 KapowTech.com All Rights Reserved Company | Contact | Terms | Privacy