Add conf_requires.
Load plugins in order
This commit is contained in:
@@ -10,6 +10,7 @@ class IWLAPreAnalysisPageToHit(IPlugin):
|
||||
def __init__(self, iwla):
|
||||
super(IWLAPreAnalysisPageToHit, self).__init__(iwla)
|
||||
self.API_VERSION = 1
|
||||
self.conf_requires = ['viewed_http_codes']
|
||||
|
||||
def load(self):
|
||||
# Remove logo from indefero
|
||||
@@ -21,7 +22,8 @@ class IWLAPreAnalysisPageToHit(IPlugin):
|
||||
|
||||
def hook(self):
|
||||
hits = self.iwla.getCurrentVisists()
|
||||
viewed_http_codes = self.iwla.getConfValue('viewed_http_codes', [200, 304])
|
||||
viewed_http_codes = self.iwla.getConfValue('viewed_http_codes')
|
||||
|
||||
for (k, super_hit) in hits.items():
|
||||
if super_hit['robot']: continue
|
||||
|
||||
@@ -31,6 +33,7 @@ class IWLAPreAnalysisPageToHit(IPlugin):
|
||||
uri = request['extract_request']['extract_uri']
|
||||
for regexp in self.regexps:
|
||||
if regexp.match(uri):
|
||||
#print '%s is an hit' % uri
|
||||
request['is_page'] = False
|
||||
super_hit['viewed_pages'] -= 1
|
||||
super_hit['viewed_hits'] += 1
|
||||
|
Reference in New Issue
Block a user