How to monitor changes on a website

 
 
  • Gérald Barré

ChangeDetection.io is a service that lets you monitor websites and get notified when a change occurs. In an ideal world, all websites would have an RSS feed that you could subscribe to, but unfortunately, this is not the case. Detecting changes could be useful to be notified when a new version of a product is released, or to detect the re-stock of a product. You can use subscribe to <changedetection.io>, which costs about $8/month, or you can host the docker containers yourself. I choose the latter option as I already have the infrastructure to host docker containers. In this post, I will describe how to do it.

First, you need to create a docker-compose.yml file. This file will configure 2 services:

  • changedetection is the main service that will monitor the website
  • playwright-chrome is a service that will be used by changedetection to access websites and execute JavaScript if needed
docker-compose.yml (YAML)
version: '3.2'
services:
    changedetection:
      image: ghcr.io/dgtlmoon/changedetection.io
      container_name: changedetection
      hostname: changedetection
      volumes:
        - ./changedetection-data:/datastore
      environment:
        - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true
        - BASE_URL=http://localhost:5000 # Replace with your public URL
        - HIDE_REFERER=true
      ports:
        - 5000:5000 # Replace with your public port (e.g. 80:5000)
      restart: unless-stopped
      depends_on:
        playwright-chrome:
            condition: service_started

    playwright-chrome:
        hostname: playwright-chrome
        image: browserless/chrome
        restart: unless-stopped
        environment:
            - SCREEN_WIDTH=1920
            - SCREEN_HEIGHT=1024
            - SCREEN_DEPTH=16
            - ENABLE_DEBUGGER=false
            - PREBOOT_CHROME=true
            - CONNECTION_TIMEOUT=300000
            - MAX_CONCURRENT_SESSIONS=10
            - CHROME_REFRESH_TIME=600000
            - DEFAULT_BLOCK_ADS=true
            - DEFAULT_STEALTH=true
            - DEFAULT_IGNORE_HTTPS_ERRORS=true

Then, you can use docker-compose up to start the service:

Shell
docker-compose up

Then, you can open http://localhost:5000 and start creating your rules. For the notifications, you need to configure how you want to receive them. There are more than 70 supported services. You can send an email, send an http request (could be integrated with Power Automate, IFTTT, Zapier, etc.), or send a message to your preferred application such as Slack or Telegram. To configure the notifications, you can navigate to http://changedetection:5000/settings#notifications. The documentation is available on the page. For instance, you can use your Gmail account to send an email: mailto://meziantou:app_password@gmail.com?to=me+notification@gmail.com. Note for Gmail users, you need to use an app password.

Do you have a question or a suggestion about this post? Contact me!

Follow me:
Enjoy this blog?Buy Me A Coffee💖 Sponsor on GitHub