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
17.46k stars 976 forks source link

[feature] Limit "Only trigger when new lines appear" to examine last X snapshots #855

Open rklos opened 2 years ago

rklos commented 2 years ago

Version and OS v0.39.17.2 docker

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like "Only trigger when new lines appear" works great, but as described it "compares new lines against all history". Sometimes it can cause some problems when after a long time there is a new line which we want to fish out, but it was (for example only once) in the whole history of watch. It will be nice to have an option to determine number of last entries to check in the history (how much in the past we are searching for), or an option to auto clear the history older than X hours/days/checks.

Describe the use-case and give concrete real-world examples I have a watch for HTML elements with label "SALE!" with an option "Only trigger when new lines appear" turned on (content on the page is moving around, so this option is a bless for me). For the first time when this text appears, my watch triggers notification. But at the next sale (after few days/weeks), when text "SALE!" appear again, notification will not be sent, because this text is already in the history.

dgtlmoon commented 2 years ago

@rklos what is the solution you are proposing? what is it that you want to happen?

rklos commented 2 years ago

@dgtlmoon maybe something like this: CleanShot 2022-08-17 at 19 40 41

I this case I'll expect that watch will search for new content only in last 15 history entries. If text is present in at least one of the last 15 entries in the history, this feature will works as before (notification won't be send). When text "SALE!" is present in 16th entry or much earlier in the past, it will be ignored and treated as new content (notification will be send). When user leave the new field empty (or something like that) this feature will search the entire history of watch.

dgtlmoon commented 2 years ago

Hmm yeah nice idea! or having it based on time could be even better? or the same?

rklos commented 2 years ago

I think it could be the same. Personally I will prefer X entries than X minutes/hours/days/weeks (entries needs only one field and if I want to search e.g. 1 week in the past I can calculate it by myself based on watch interval)