Logo Search packages:      
Sourcecode: harvestman version File versions  Download package

def HarvestMan::urlparser::HarvestManUrlParser::anchorcheck (   self  ) 

Checking for anchor tags and processing accordingly 

Definition at line 161 of file urlparser.py.

00161                          :
        """ Checking for anchor tags and processing accordingly """

        if self.typ == 'anchor':
            if not self.baseurl:
                raise HarvestManUrlParserError, 'Base url should not be empty for anchor type url'
            
            index = self.url.rfind('#')
            if index != -1:
                newhref = self.url[:index]
                self.anchor = self.url[index:]
                if newhref:
                    self.url = newhref
                else:
                    self.url = self.baseurl.url

        else:
            pass


Generated by  Doxygen 1.6.0   Back to index