Fixed __init__ and removed print

This commit is contained in:
Edgar P. Burkhart 2020-09-20 21:14:12 +02:00
parent f49d774730
commit 812e163169
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -20,16 +20,19 @@ class GoogleSheetsCalParser(HTMLParser):
self.inTable = False self.inTable = False
self.row = 0 self.row = 0
self.column = 0 self.column = 0
self.__init__() HTMLParser.__init__(self)
def handle_starttag(self, tag, attrs): def handle_starttag(self, tag, attrs):
print(1) if self.inTable:
...
elif tag == 'table':
self.inTable = True
def handle_endtag(self, tag): def handle_endtag(self, tag):
print(1) ...
def handle_data(self, data): def handle_data(self, data):
print(1) ...
# Getting the Google Sheet # Getting the Google Sheet
@ -44,7 +47,7 @@ if r.status_code != 200:
sys.exit(1) sys.exit(1)
# Parsing the Sheet # Parsing the Sheet
calParser = GoogleSheetsParser() calParser = GoogleSheetsCalParser()
calParser.feed(r.text) calParser.feed(r.text)
# Transforming the cells into events # Transforming the cells into events