0

I would like to make a screenshot of a website with something like

google-chrome --headless --screenshot https://www.google.com

But most of the websites today have this popping cookie consent notifications so the screenshot looks something like this: google.com screenshot

Is there any way or command to disable this, like disabling javascript or something similar to get a propper picture of the website?

Found the command --blink-settings=scriptEnabled=false that disable javascript both for chromium and chrome. For some websites this helps, but if they heavily depend on javascript, there is not much that gets screenshoted.

Mi Be
  • 413
  • 8
  • 16
  • I found a quite complicated but working anwser: the first anwser to this stackoverflow threat: https://stackoverflow.com/questions/45372066/is-it-possible-to-run-google-chrome-in-headless-mode-with-extensions PLUS installing an extension for chrome like i-dont-care-about-cookies with a script for example like https://askubuntu.com/questions/1063331/how-to-install-google-chrome-extensions-though-terminal – Mi Be Oct 18 '21 at 17:25

0 Answers0