Make debug output better readable
This commit is contained in:
parent
5d141113aa
commit
15eec712f2
@ -19,9 +19,16 @@ class HtmlImport:
|
||||
|
||||
class HtmlParser:
|
||||
|
||||
def __init__(self, text: str):
|
||||
def __init__(self, text: str, fileName: str = None):
|
||||
self.l = logging.getLogger('solo_turnier.html_parser')
|
||||
self.soup = BeautifulSoup(text, 'html.parser')
|
||||
self.fileName = fileName
|
||||
|
||||
def __repr__(self):
|
||||
if self.fileName is None:
|
||||
return 'HtmlParser(direct text)'
|
||||
else:
|
||||
return f'HtmlParser({self.fileName})'
|
||||
|
||||
def getEventTitle(self):
|
||||
return self.soup.find('div', class_='eventhead').table.tr.td.contents[0]
|
||||
|
Loading…
Reference in New Issue
Block a user