From ab13f81fd7208ac2ed9a3e329f05263bacab65e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 13 Feb 2020 23:44:02 +0100 Subject: [PATCH] add example to 'cookies' docs --- docs/configuration.rst | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 5444affd..5d2ab588 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -225,12 +225,21 @@ extractor.*.cookies =========== ===== Type |Path|_ or ``object`` Default ``null`` -Description Source to read additional cookies from. +Description Source to read additional cookies from. Either as + + * the |Path|_ to a Mozilla/Netscape format cookies.txt file or + * a JSON ``object`` specifying cookies as a name-to-value mapping + + Example: + + .. code:: + + { + "cookie-name": "cookie-value", + "sessionid" : "14313336321%3AsabDFvuASDnlpb%3A31", + "isAdult" : "1" + } - * If this is a |Path|_, it specifies a - Mozilla/Netscape format cookies.txt file. - * If this is an ``object``, its key-value pairs, which should both - be ``strings``, will be used as cookie-names and -values. =========== ===== @@ -239,8 +248,9 @@ extractor.*.cookies-update =========== ===== Type ``bool`` Default ``true`` -Description If `extractor.*.cookies`_ specifies a cookies.txt file, update its - contents with cookies received during data extraction. +Description If `extractor.*.cookies`_ specifies the |Path|_ to a cookies.txt + file and it can be opened and parsed without errors, + update its contents with cookies received during data extraction. =========== =====