Skip to content

Added Devtools protocol support for Chromium based browsers.#53

Open
zonicdoe wants to merge 1 commit intomaaaaz:masterfrom
zonicdoe:staging
Open

Added Devtools protocol support for Chromium based browsers.#53
zonicdoe wants to merge 1 commit intomaaaaz:masterfrom
zonicdoe:staging

Conversation

@zonicdoe
Copy link

@zonicdoe zonicdoe commented May 12, 2020

Added Devtools protocol support for Chromium based browsers.
Requires Python >=3.6.1 and websockets.
Options now available for those browsers:

  • -f or --format (PDF, JPG, JPEG and PNG)
  • -q or --quality (Only for JPG or JPEG files)
  • --crop
  • -c or --cookie
  • -a or --header ("Host header not allowed due to a Chromium engine bug still not fixed.")

Additionally, one more option was created:

  • -d or --delay: In seconds, delay before the screenshots are taken (only for these type of renderer).

I will add a work around for the HTTP Host header in my personal repository, I don't include this work around here because it's very messy, and to be honest, I don't think that many people would benefit from it. I need this because some times I want to screenshot against some WAF protected sites directly using the IP address, but for virtual hosts I need to inject the host header.

TODO: To spawn an independent instance of the Chrome/Chromium browser, a temporary directory is created to load a new Profile (in the current working directory). Some logic has to be added to handle this directory (move it to another location or delete it after the process is completed).

It's was very easy to add new functionality to the code because it's very well structured.
Thanks for this amazing tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant