예제 #1
0
 def find_matching_ua(self, user_agent):
     if user_agent.startswith(u"Apple"):
         tolerance = third_space(user_agent)
     else:
         tolerance = first_semi_colon(user_agent)
     match = self.ris_matcher(user_agent, tolerance)
     #print "AppleMatcher %s -> f_m_ua -> %s" % (user_agent, match)
     return match
예제 #2
0
파일: handlers.py 프로젝트: codiez/pywurfl
 def look_for_matching_user_agent(self, user_agent):
     tolerance = utils.first_semi_colon(user_agent)
     match = ld_match(self.user_agents, user_agent, tolerance)
     #print "AppleMatcher %s -> l_f_m_ua -> %s" % (user_agent, match)
     return match