add robot flag to parse_useragent

This commit is contained in:
rolux 2012-03-26 13:40:00 +02:00
parent 224fcf7955
commit 1828701abd

View file

@ -63,6 +63,7 @@ UA_REGEXPS = {
'browser': [
'(Camino)\/(\d+)',
'(chromeframe)\/(\d+)',
'(Google Web Preview).+Chrome\/(\d+)',
'(Chrome)\/(\d+)',
'(Epiphany)\/(\d+)',
'(Firefox)\/(\d+)',
@ -281,6 +282,7 @@ def parse_useragent(useragent):
'string': string
}
break;
data['robot'] = data['browser']['name'] in ['Google Web Preview', 'Googlebot']
return data
def removeSpecialCharacters(text):