From 6df9d8e9e15d8daa9f117f379a7d3f2e11104309 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 19 Nov 2018 15:56:08 +0100 Subject: controller: Add parameters to warcinfo Add parameters the grab was run with, so we can actually reproduce a run. --- crocoite/controller.py | 7 +++++++ 1 file changed, 7 insertions(+) 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)) -- cgit v1.2.3