how can I use the --cookie parameter? The examples section says --cookie="id=unicorn; Expires=Wed, 21 Oct 2018 07:28:00 GMT;".
Putting this into a CLI command will not work. Here's an example:
$ ~/node_modules/capture-website-cli/cli.js https://www.google.de --cookie="CONSENT=YES+DE.en+V9; Expires=Sat, 09 Jan 2038 07:28:00 GMT;" --output=test.png
^CError: Protocol error (Network.setCookies): Invalid parameters cookies.0.expires: double value expected
at Promise (/home/knipser/node_modules/capture-website-cli/node_modules/puppeteer/lib/Connection.js:183:56)
at new Promise (<anonymous>)
at CDPSession.send (/home/knipser/node_modules/capture-website-cli/node_modules/puppeteer/lib/Connection.js:182:12)
at Page.setCookie (/home/knipser/node_modules/capture-website-cli/node_modules/puppeteer/lib/Page.js:416:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
-- ASYNC --
at Page.<anonymous> (/home/knipser/node_modules/capture-website-cli/node_modules/puppeteer/lib/helper.js:111:15)
at captureWebsite (/home/knipser/node_modules/capture-website-cli/node_modules/capture-website/index.js:213:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
After the CLI was entered the process hangs until I press CTRL-c (you can see the ^C in the output) and then the error messages appears.
Shouldn't the --cookie parameter be parsed so the underlying library got some dictionary instead of a simple string? In the cli.js the parameter will be just arrifyed.
Hello *,
how can I use the
--cookie
parameter? The examples section says--cookie="id=unicorn; Expires=Wed, 21 Oct 2018 07:28:00 GMT;"
.Putting this into a CLI command will not work. Here's an example:
After the CLI was entered the process hangs until I press
CTRL-c
(you can see the^C
in the output) and then the error messages appears.Shouldn't the
--cookie
parameter be parsed so the underlying library got some dictionary instead of a simple string? In the cli.js the parameter will be justarrify
ed.