summaryrefslogtreecommitdiff
path: root/crocoite/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'crocoite/controller.py')
-rw-r--r--crocoite/controller.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/crocoite/controller.py b/crocoite/controller.py
index dd47776..4d95b09 100644
--- a/crocoite/controller.py
+++ b/crocoite/controller.py
@@ -167,10 +167,10 @@ class SinglePageController:
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 ():
self.processItem (item)
- await l.start ()
# wait until the browser has a) been idle for at least
# settings.idleTimeout or b) settings.timeout is exceeded
@@ -197,11 +197,11 @@ class SinglePageController:
idleTimeout = self.settings.idleTimeout
else:
idleTimeout = None
- await l.tab.Page.stopLoading ()
for b in enabledBehavior:
async for item in b.onstop ():
self.processItem (item)
+ await l.tab.Page.stopLoading ()
await asyncio.sleep (1)