32
loading...
This website collects cookies to deliver better user experience
xml.zip
.HTMLParser
from the package html.parser
, documented here.HTMLParser
class, you simply create a subclass from it. Then, depending on what you need to get from HTML data, you implement the handle_*
methods. For example, to parse links from the https://www.gesetze-im-internet.de front page, you need the following code:partial_list_urls
, we must add another parser to fetch the links to XML documents. This parser also stores law names.urlretrieve
action as well, we get this: