Go to file
2022-05-28 12:54:53 +02:00
Docker Return images in chronological order 2022-05-27 15:49:56 +02:00
.gitignore Remove interval once the website loads 2022-04-24 20:35:24 +02:00
docker-args.js Add a webservice API with polling 2022-05-05 21:54:34 +02:00
index.js Decrease window manage verbosity 2022-05-25 19:49:08 +02:00
memory.js Restore memory 2022-05-05 22:00:04 +02:00
package-lock.json Add a webservice API with polling 2022-05-05 21:54:34 +02:00
package.json Dirst attempt at the daemon 2022-05-28 12:54:53 +02:00
README.md Dirst attempt at the daemon 2022-05-28 12:54:53 +02:00
request.js Return images in chronological order 2022-05-27 15:49:56 +02:00
run.sh Live preview 2022-04-24 20:04:45 +02:00
screenshot-service.service Dirst attempt at the daemon 2022-05-28 12:54:53 +02:00

Screenshot service

Dependencies

  • Xvfb
  • fluxbox
  • firefox-beta

Building

docker image build -t headless-fox Docker

Running a single analysis

BASE_URL=http://localhost:3000 docker run -i -v $PWD/static:/opt/static  headless-fox ./script3.sh '{"url": "pearson.pl", "third_party_domains": ["hotjar.com", "cookielaw.org"]}' 123

Running the server

BASE_URL=http://localhost:3000 node .

To set up a systemd daemon that starts with the server, use:

npm run install-daemon

Testing the API

with httpie:

http POST localhost:3000/api/requests url==pearson.com 'domains[]==youtube.com' 'domains[]==google.com'

It returns a 303 response that redirects to a URL you can poll to see the status of the screenshot request.