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

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

Find out by filename extension if the file <filename>
is an html or html-like (server-side dynamic html files)
file, or a candidate for one 

Definition at line 476 of file urlparser.py.

00476                         :
        """ Find out by filename extension if the file <filename>
        is an html or html-like (server-side dynamic html files)
        file, or a candidate for one """

        # Note: right now we treat dynamic server-side scripts namely
        # php, psp, asp, pl, jsp, and cgi as possible html candidates, though
        # actually they might be generating non-html content (like dynamic
        # images.)
        if self.typ in ('webpage', 'base'):
            return True
        elif self.typ == 'normal':
            if self.validfilename:
                extn = ((os.path.splitext(self.validfilename))[1]).lower()
                if extn in self.webpage_extns:
                    return True
             
        return False


Generated by  Doxygen 1.6.0   Back to index