317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
-
+
-
+
|
#self._log.info('got {} lines from database'.format(len(result)))
for row in result:
if row != None and row[0] != None:
if row[1] != None:
self._log.info('trying regexp "{}" versus "{}"'.format(row[1], url_path))
try:
if re.compile(row[1]).match(url_path):
reply = row[0].format(url_path)
reply = row[0].format(host = site, path = url_path)
else:
continue
except:
self._log.info("can't compile regexp")
else:
reply = row[0].format(url_path)
reply = row[0].format(host = site, path = url_path)
if reply != None:
self.writeline('{} {}'.format(id, reply))
return(True)
self.writeline('{}'.format(id))
def loop(self):
while True:
|