Dockerized python script comparing two site by determining the screenshot of each given path using structural_similarity from scikit-image
Multi-arch support arm64, amd64
-s
to specify the smartphone mode-p
path to your list of web pages
-d
Detached mode (optional): Run containers in the background
$ docker-compose up -d
$ python3 site_compare.py -p path.txt site-1.com site-2.com
$ docker-compose exec app python3 site_compare.py -p path.txt site-1.com site-2.com
- Create
.env
file in project root directory - copy the content from .env.sample
- replace DOCKER_PLATFORM with CPU architecture type of your host machine (arm64, amd64)
path.txt
contain all the available path of the given site
/
/a
/a/xyz
site-1.com
andsite-2.com
target site
after execution finish the program will generate an output
folder in os.path.getcwd()
├── output
│ ├── site-1
│ │ ├── output
│ │ │ ├── ...path.png (output after compare)
│ │ ├── ...path.png (screenshots)
│ ├── site-2
│ │ ├── output
│ │ │ ├── ...path.png (output after compare)
│ │ ├── ...path.png (screenshots)
and result.txt
in os.path.getcwd()
contain the similarity output of the both sites
error.txt
will be also generated. contain path that was error during the process such as 404, 403 ...etc