I pulled your branch and played with this. Wow, this is super cool!!
And for simple tests (like the whitespace one), you can put an anonymous lambda function right in the ElementClass() call:
==== match_non_whitespace = ElementMatcher(lambda element: not (isinstance(element, NavigableString) and element.text.isspace()) ) ====
I like the ElementMatcher name. It intuitively describes its purpose.
This is just awesome. Please let me know how I can help.
I pulled your branch and played with this. Wow, this is super cool!!
And for simple tests (like the whitespace one), you can put an anonymous lambda function right in the ElementClass() call:
==== whitespace = ElementMatcher( lambda element: element, NavigableString) and element. text.isspace( ))
match_non_
not (isinstance(
)
====
I like the ElementMatcher name. It intuitively describes its purpose.
This is just awesome. Please let me know how I can help.