diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-11-19 15:56:08 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-11-19 15:56:08 +0100 |
commit | 6df9d8e9e15d8daa9f117f379a7d3f2e11104309 (patch) | |
tree | c3218a1f04ac90b436383c0d3cde0c48715fccff | |
parent | 3c009f3ff45d89a703bc833c900e06a79b32f1c1 (diff) | |
download | crocoite-6df9d8e9e15d8daa9f117f379a7d3f2e11104309.tar.gz crocoite-6df9d8e9e15d8daa9f117f379a7d3f2e11104309.tar.bz2 crocoite-6df9d8e9e15d8daa9f117f379a7d3f2e11104309.zip |
controller: Add parameters to warcinfo
Add parameters the grab was run with, so we can actually reproduce a
run.
-rw-r--r-- | crocoite/controller.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crocoite/controller.py b/crocoite/controller.py index 1a41117..62676ea 100644 --- a/crocoite/controller.py +++ b/crocoite/controller.py @@ -27,6 +27,7 @@ import tempfile, asyncio, json, os from itertools import islice from datetime import datetime from urllib.parse import urlparse +from operator import attrgetter from . import behavior as cbehavior from .browser import SiteLoader, Item @@ -153,6 +154,12 @@ class SinglePageController: 'useragent': version['userAgent'], 'viewport': await getFormattedViewportMetrics (l.tab), }, + 'parameters': { + 'url': self.url, + 'idleTimeout': self.settings.idleTimeout, + 'timeout': self.settings.timeout, + 'behavior': list (map (attrgetter('name'), self.behavior)), + }, } self.processItem (ControllerStart (payload)) |