The main class has a basic example that you can run and tweak. The HTML parser doesn't support a lot of things, but notably self-closing tags (<hr>
โ <hr></hr>
). It probably can't parse any old website you find online, but it might give you a nice error message. Might.
The best and most interesting code is in dom.HtmlParser, rules.RuleParser, and selectors.*.
Symbol | Name |
---|---|
> |
Child |
. |
Class |
# |
ID |
~ |
Sibling |
+ |
Adjacent Sibling |
* |
Wildcard |
Tags | |
Descendant |
best parser