(self, useragent)
return False
check if this entry applies to the specified agent
check if this entry applies to the specified agent
check if this entry applies to the specified agent
def applies_to(self, useragent):
        """check if this entry applies to the specified agent"""
        # split the name token and make it lower case
        useragent = useragent.split("/")[0].lower()
        for agent in self.useragents:
            if agent == '*':
                # we have the catch-all agent
                return True
            agent = agent.lower()
            if agent in useragent:
                return True
        return False
def applies_to ( self , useragent ) : # split the name token and make it lower case useragent = useragent . split ( "/" ) [ 0 ] . lower ( ) for agent in self . useragents : if agent == '*' : # we have the catch-all agent return True agent = agent . lower ( ) if agent in useragent : return True return False