Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to exclude HTML tags from beeing monitored #19

Open
coveritytest opened this issue Feb 2, 2021 · 4 comments
Open

Add possibility to exclude HTML tags from beeing monitored #19

coveritytest opened this issue Feb 2, 2021 · 4 comments

Comments

@coveritytest
Copy link
Contributor

A feature request would be to exclude certain HTML tags from beeing monitored, for example when checking I might want <script> tags to be ignored.

@coveritytest
Copy link
Contributor Author

coveritytest commented Feb 4, 2021

Or even when filtering <div> I might want to ignore another nested <div> with a different class or id.

@muety
Copy link
Owner

muety commented Feb 4, 2021

First solution that comes to my mind is a separate config file (something like blacklist.txt or so) consisting of a set of XPath queries addressing elements to exclude.

Something like: watcher.py -u https://github.com --ignore-elements blacklist.txt with blacklist.txt:

//script
//hr
/body/div[@class="some-list"]/div[@class="useless-element"]

What do you think? Do you have any preference about how to realize this feature?

@coveritytest
Copy link
Contributor Author

I think, that's a good idea. You could also include it in the example/many.json file. One single XPath to use for diff and then a list of XPath to ignore.

@muety
Copy link
Owner

muety commented Feb 4, 2021

Good point, shouldn't forget about that.

An alternative to having a separate file would be to simply allow multiple --ignore parameters. I think I like that option better.

Hope I can work on this soon. If you have some time, of course, feel free to contribute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants