pylinkvalidator icon indicating copy to clipboard operation
pylinkvalidator copied to clipboard

filter by file

Open jimpriest opened this issue 10 years ago • 2 comments

There is IGNORED_PREFIXES but I need to filter a particular file out of the results...

All our WordPress blogs include http://my.domain/xmlrpc.php which always returns a 405.

Would it be possible to add another flag, or maybe make make the current "ignore" more flexible (regex maybe)?

I'm going to dig into the code but figured you may have a quick solution.

jimpriest avatar Sep 01 '15 15:09 jimpriest

ignored prefixes makes it super easy to block entire sections of sites, but it makes sense to add two new params: include_only (regex) and exclude (regex).

These parameters are relatively easy to add and would be used here: https://github.com/bartdag/pylinkvalidator/blob/283bfddf237dfb7101753178fe24a59c25088b5f/pylinkvalidator/models.py#L172

bartdag avatar Sep 01 '15 16:09 bartdag

OK - I was just looking at the same spot (I must be learning something!)

I'm looking for exclude which seems straightforward - if the regex matches - return false.

Include only would really be the inverse.

I may take a stab at hacking on this today if I have time.

jimpriest avatar Sep 01 '15 16:09 jimpriest