The htmllib Module
The htmllib module supplies a class named HTMLParser that subclasses SGMLParser and defines start_tag, do_tag, and end_tag methods for HTML 2.0 tags. HTMLParser implements and overrides methods to perform calls to methods of a formatter object, covered in “The formatter Module” in The htmllib Module. You can subclass HTMLParser and override methods. In addition to start_tag, do_tag, and end_tag methods, an instance h of HTMLParser supplies the following attributes and methods.
anchor_bgn |
Called for each |
anchor_end |
Called for each |
anchorlist | The |
formatter | The |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access