kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Strona:
Detecting changes in HTML page sources
Strony
API Reference
Adding headers from an external file
Browser Steps
CSS Selector help
Case Studies
Community watch list
Configurable BASE_URL setting
Detecting changes in HTML page sources
Detecting changes in images
Developer Notes
Developer Philosophy
Fetching pages with WebDriver
Handling variables in the watched URL
Home
JSON Selector Filter help
Microsoft Windows
Misc system settings
Notification configuration notes
Password protection
Playwright content fetcher
Proxy configuration
Recipes
Restoring backup files
Run JavaScript before change detection
Running changedetection.io behind a reverse proxy
Sharing a Watch
Synology NAS setup
Troubleshooting
Using POST PUT PATCH DELETE requests
Using the {{diff}}, {{diff_added}}, and {{diff_removal}} notification tokens
Using the {{diff}}, {{diff_added}}, and {{diff_removed}} notification tokens
iPadOS Install Notes WIP
2
Detecting changes in HTML page sources
dgtlmoon edytuje tę stronę 2024-11-25 08:46:05 +01:00
For some webpages, relevant information is best accessed by checking the HTML page source.
Use Case
For example, the HTML response of web shops like https://www.campuspoint.de contains the product listings in JSON format which is then processed client-side with JS to produce the final markup. One could use the JS-enabled Playwright-content-fetcher for such a webpage, but checking against the page source is more efficient.
Approach
- In the General tab, prepend the target URL with
source:
(example:source:https://www.campuspoint.de/mobile/notebooks/lenovo/thinkpad-t-serie/thinkpad-t14s.html
) - In the Request tab, choose the "Basic fast Plaintext/HTTP Client" fetch method
- Choose a suitable trigger in the Filters & Triggers tab, for example the regex-based "Extract text" one.
- Example: use
/"product_count":(\d+)/i
to check when campuspoint.de adds new models of a certain laptop series to their inventory.
- Example: use
more at https://changedetection.io/tutorial/source-code-monitor-how-get-alerts-changes-html-source-code