dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
15.79k stars 883 forks source link

Inline Script Detection #2452

Closed sidnetopia closed 3 days ago

sidnetopia commented 3 days ago

Hello everyone,

I'm currently using changedetection.io and I've encountered an issue with detecting changes in an inline script within an HTML page. My HTML structure looks like this:

<html>
  <head>
    <script id="data-injector-instances">
      {
        "baseUrl":"https://example.com/initial-ur1adsdsaadsadsadssadadsasadsadsl.jpg",
        "apiKey":"123asdasd452131326"
      }
    </script>
  </head>
  <body>
    12312 online
  </body>
</html>

I need to monitor changes in the baseUrl within the inline script, but it seems that changedetection.io only detects changes in the body of the HTML document.

Has anyone successfully configured changedetection.io to detect changes in inline scripts, particularly within the <head> section? Any advice or guidance on how to achieve this would be greatly appreciated.

maxmichels commented 3 days ago

@sidnetopia Check here: https://changedetection.io/tutorial/source-code-monitor-how-get-alerts-changes-html-source-code Should also be possible for script blocks.

sidnetopia commented 3 days ago

source: did the job. thanks @maxmichels