Answer the question
In order to leave comments, you need to log in
How to monitor the fact that a web page has changed?
Task: to track the fact of changing a web page like https://www.fonbet.ru/sports/chess/
To begin with, it is a fact, and not what has changed there.
I know that there are ready-made solutions that work well for me with other sites.
The problem is that none of the out-of-the-box tools I've tried (distill.io, visualping) work properly with the content of this page.
My cumbersome solution: a python script that regularly takes partial browser screenshots of this page (where there are no blinking banners). If the next screenshot differs from the previous one, a notification is sent.
Since this requires a page to be always open on the screen, this is all done in a virtual OS.
Question: Is there an easier way?
Answer the question
In order to leave comments, you need to log in
Task: track the fact that a web page has changed
const targetNode = document.querySelector("body");
const config = {attributes: true, childList: true, subtree: true};
function callback(mutationsList, observer) {
console.log("Что-то изменилось", mutationsList);
}
const observer = new MutationObserver(callback);
observer.observe(targetNode, config);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question