The sgmllib Module
The name of the sgmllib
module is misleading: sgmllib
parses only a tiny subset of SGML, but it is still a good way to get information from HTML files. sgmllib
supplies one class, SGMLParser
, which you subclass, overriding methods. The most frequently used methods of an instance s
of your subclass X
of SGMLParser
are as follows.
close |
Tells the parser that there is no more input data. When |
do_tag |
|
end_tag |
|
feed |
Passes to the parser some of the text being parsed. The ... |
Get Python in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.