INNER CODE UNIT · Python
__init__
lefterisloukas/edgar-crawler · extract_items.py:73
def __init__(self):
"""
Initializes HtmlStripper by calling the constructor of the parent class, resetting the parser,
and initializing some attributes.
"""
super().__init__()
self.reset()
self.strict = False # Not used, but necessary for inheritance
self.convert_charrefs = True # Convert all character references
self.fed = [] # List to hold the data
def handle_data(self, data: str) -> None:
"""
Append the raw data to the list.
This method is called whenever raw data is encountered. In the context of
this class, we just append the data to the fed list.