SR-G / watchthatpage

Command line utility allowing to monitor remote web pages and trigger mail notifications when some modifications are detected.
Apache License 2.0
80 stars 11 forks source link

More info about Selectors and SectionsToSkip #7

Closed plangin closed 4 years ago

plangin commented 4 years ago

Thank you for this tool. I have it running in the meantime with 3 cron jobs (hourly, daily, weekly).

The readme is also quite comprehensive, but I'm still unsure which possibilities Selectors and SectionsToSkip do offer. The only example of Selectors is this:

"Selectors" : { "http://www.fiio.me/forum.php?mod=viewthread&tid=39932" : { "Selector" : "td[id=postmessage_105396]", "SelectorsToSkip" : [ "ignore_js_op" ] } },

Is there any in-depth documentation for Selectors and SectionsToSkip?

Thanks

SR-G commented 4 years ago

Hello.

The implemented are really just regular CSS selectors (as available in other languages, javascript, and so on)..

Here this golang implementation is coming from the golang additional library "andybalholm/cascadia".

You can find additional examples / explanations in various regular areas like :

It's of course the same syntax here for "Selector" and "SelectorsToSkip". I had a few situation for which it was easier to filter (main "Selector" entry) and then to exclude additional patterns (SelectorsToSkip) (which can of course be empty if not needed).

plangin commented 4 years ago

Great, thank you. Also for your quick answer.

Very helpful stuff, will dig into it.