maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
653 stars 162 forks source link

Added Devtools protocol support for Chromium based browsers. #53

Open zonicdoe opened 4 years ago

zonicdoe commented 4 years ago

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

Additionally, one more option was created:

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.