Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How would I go about taking a screenshot of a web page at intervals and comparing it to a known image?

I'm not sure if this is some CV question, as I don't really have a background in it. Occasionally my website has trouble rendering after Wordpress/plugin updates, and it might go a day or two before I notice it. I'm wondering if there is a way that I can run (preferably in a docker container on my kubernetes deployment) a container that will, at intervals, take a screenshot of what my website looks like, and then compare that to a pre-determined screenshot of what it should look like. If it differs too much, send me an alert.

I've found this already: How can I take a screenshot/image of a website using Python? . but I'm not sure how I would plumb additional code to then compare the rendered jpg vs pre-defined jpg. I found OpenCV, which might be what I'm looking for, but not sure where to start on this.

This looks like maybe what I'm trying to do:https://www.pyimagesearch.com/2017/06/19/image-difference-with-opencv-and-python/

They use SSIM to output a score.. Might be able to use that.

Thanks!

Comments