Basically seems to work
This commit is contained in:
parent
7bd5a42962
commit
f593cc78d9
|
@ -13,6 +13,8 @@ def hook(hits):
|
|||
|
||||
for p in super_hit['pages']:
|
||||
if not p['is_page']: continue
|
||||
if int(p['status']) != 200: continue
|
||||
|
||||
if logo_re.match(p['extract_request']['extract_uri']):
|
||||
p['is_page'] = False
|
||||
if super_hit['viewed_pages']:
|
||||
|
|
|
@ -19,6 +19,9 @@ def hook(hits):
|
|||
if not super_hit['viewed_hits']:
|
||||
super_hit['robot'] = 1
|
||||
continue
|
||||
elif not super_hit['viewed_pages']:
|
||||
# Hit only
|
||||
super_hit['hit_only'] = 1
|
||||
|
||||
for hit in super_hit['pages']:
|
||||
# 3) /robots.txt read
|
||||
|
|
2
iwla.py
2
iwla.py
|
@ -161,6 +161,7 @@ def createUser(hit):
|
|||
super_hit['last_access'] = meta_visit['last_time']
|
||||
super_hit['pages'] = [];
|
||||
super_hit['robot'] = isRobot(hit);
|
||||
super_hit['hit_only'] = 0;
|
||||
appendHit(hit)
|
||||
|
||||
def isRobot(hit):
|
||||
|
@ -276,6 +277,7 @@ def generateStats(visits):
|
|||
|
||||
print "[%s] =>\t%d/%d" % (k, super_hit['viewed_pages'], super_hit['viewed_hits'])
|
||||
|
||||
if not super_hit['hit_only']:
|
||||
stats['nb_visitors'] += 1
|
||||
stats['viewed_bandwidth'] += super_hit['bandwith']
|
||||
stats['viewed_pages'] += super_hit['viewed_pages']
|
||||
|
|
Loading…
Reference in New Issue
Block a user