Make backup before compressing (low memory servers)
Fix error : Call post hook plugins even in display only mode Don't compute unordered hits (remove pasts if they are found after current) Remove tags in stats diff Don't do geolocalisation is visitor is not valid Don't try to find search engine on robots Update robot check rules Add top_pages_diff plugin
This commit is contained in:
@@ -82,6 +82,8 @@ class IWLAPostAnalysisIPToGeo(IPlugin):
|
||||
(_, cc) = self.iptogeo.ip_to_geo(ip)
|
||||
cc = cc and cc or 'ip'
|
||||
visitor['country_code'] = cc
|
||||
if not self.iwla.isValidVisitor(visitor):
|
||||
continue
|
||||
if cc in geo.keys():
|
||||
geo[cc] += 1
|
||||
else:
|
||||
|
@@ -140,30 +140,32 @@ class IWLAPostAnalysisReferers(IPlugin):
|
||||
uri = r['extract_referer']['extract_uri']
|
||||
if self.own_domain_re.match(uri): continue
|
||||
|
||||
is_search_engine = False
|
||||
for (name, engine) in self.search_engines.items():
|
||||
for (hashid, hashid_re) in engine['hashid']:
|
||||
if not hashid_re.match(uri): continue
|
||||
|
||||
not_engine = engine.get('not_search_engine', None)
|
||||
# Try not engine
|
||||
if not_engine and not_engine.match(uri): break
|
||||
is_search_engine = True
|
||||
uri = name
|
||||
|
||||
parameters = r['extract_referer'].get('extract_parameters', None)
|
||||
key_phrase_re = engine.get('known_url', None)
|
||||
|
||||
self._extractKeyPhrase(key_phrase_re, parameters, key_phrases)
|
||||
break
|
||||
|
||||
if is_search_engine:
|
||||
dictionary = search_engine_referers
|
||||
elif super_hit['robot']:
|
||||
if super_hit['robot']:
|
||||
dictionary = robots_referers
|
||||
# print '%s => %s' % (uri, super_hit['remote_ip'])
|
||||
else:
|
||||
dictionary = referers
|
||||
is_search_engine = False
|
||||
for (name, engine) in self.search_engines.items():
|
||||
for (hashid, hashid_re) in engine['hashid']:
|
||||
if not hashid_re.match(uri): continue
|
||||
|
||||
not_engine = engine.get('not_search_engine', None)
|
||||
# Try not engine
|
||||
if not_engine and not_engine.match(uri): break
|
||||
is_search_engine = True
|
||||
uri = name
|
||||
|
||||
parameters = r['extract_referer'].get('extract_parameters', None)
|
||||
key_phrase_re = engine.get('known_url', None)
|
||||
|
||||
self._extractKeyPhrase(key_phrase_re, parameters, key_phrases)
|
||||
break
|
||||
|
||||
if is_search_engine:
|
||||
dictionary = search_engine_referers
|
||||
else:
|
||||
dictionary = referers
|
||||
|
||||
if r['is_page']:
|
||||
key = 'pages'
|
||||
else:
|
||||
|
Reference in New Issue
Block a user