summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-12-02 10:57:26 +0100
committerLars-Dominik Braun <lars@6xq.net>2018-12-02 11:38:58 +0100
commit5db26384556be4d7cee3ba93dfc6375c8d80b6ea (patch)
treef165940d275fa999b48d6bb3d5cdd24152d6e14b /crocoite
parent427f5972bb78fcfbe9d90aac6251d0121d2f1942 (diff)
downloadcrocoite-5db26384556be4d7cee3ba93dfc6375c8d80b6ea.tar.gz
crocoite-5db26384556be4d7cee3ba93dfc6375c8d80b6ea.tar.bz2
crocoite-5db26384556be4d7cee3ba93dfc6375c8d80b6ea.zip
controller: Add only enabled behavior scripts to warcinfo
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/controller.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/crocoite/controller.py b/crocoite/controller.py
index 8b25d1f..22e7e28 100644
--- a/crocoite/controller.py
+++ b/crocoite/controller.py
@@ -137,6 +137,10 @@ class SinglePageController:
start = time.time ()
+ # not all behavior scripts are allowed for every URL, filter them
+ enabledBehavior = list (filter (lambda x: self.url in x,
+ map (lambda x: x (l, logger), self.behavior)))
+
version = await l.tab.Browser.getVersion ()
payload = {
'software': {
@@ -157,15 +161,11 @@ class SinglePageController:
'url': self.url,
'idleTimeout': self.settings.idleTimeout,
'timeout': self.settings.timeout,
- 'behavior': list (map (attrgetter('name'), self.behavior)),
+ 'behavior': list (map (attrgetter('name'), enabledBehavior)),
},
}
self.processItem (ControllerStart (payload))
- # not all behavior scripts are allowed for every URL, filter them
- enabledBehavior = list (filter (lambda x: self.url in x,
- map (lambda x: x (l, logger), self.behavior)))
-
await l.start ()
for b in enabledBehavior:
async for item in b.onload ():