Update code for Python3

This commit is contained in:
2020-10-30 14:42:56 +01:00
parent 6f9622bb91
commit f457f4e390
11 changed files with 34 additions and 34 deletions

View File

@@ -59,11 +59,11 @@ class IWLAPreAnalysisPageToHit(IPlugin):
def load(self):
# Page to hit
self.ph_regexps = self.iwla.getConfValue('page_to_hit_conf', [])
self.ph_regexps = map(lambda(r): re.compile(r), self.ph_regexps)
self.ph_regexps = map(lambda r: re.compile(r), self.ph_regexps)
# Hit to page
self.hp_regexps = self.iwla.getConfValue('hit_to_page_conf', [])
self.hp_regexps = map(lambda(r): re.compile(r), self.hp_regexps)
self.hp_regexps = map(lambda r: re.compile(r), self.hp_regexps)
self.logger = logging.getLogger(self.__class__.__name__)
return True

View File

@@ -60,7 +60,7 @@ class IWLAPreAnalysisRobots(IPlugin):
self.API_VERSION = 1
def load(self):
self.awstats_robots = map(lambda (x) : re.compile(('.*%s.*') % (x), re.IGNORECASE), awstats_data.robots)
self.awstats_robots = map(lambda x : re.compile(('.*%s.*') % (x), re.IGNORECASE), awstats_data.robots)
self.robot_re = re.compile(r'.*bot.*', re.IGNORECASE)
self.crawl_re = re.compile(r'.*crawl.*', re.IGNORECASE)
self.logger = logging.getLogger(self.__class__.__name__)