Fixed __init__ and removed print
This commit is contained in:
parent
f49d774730
commit
812e163169
1 changed files with 8 additions and 5 deletions
13
parser.py
13
parser.py
|
@ -20,16 +20,19 @@ class GoogleSheetsCalParser(HTMLParser):
|
|||
self.inTable = False
|
||||
self.row = 0
|
||||
self.column = 0
|
||||
self.__init__()
|
||||
HTMLParser.__init__(self)
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
print(1)
|
||||
if self.inTable:
|
||||
...
|
||||
elif tag == 'table':
|
||||
self.inTable = True
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
print(1)
|
||||
...
|
||||
|
||||
def handle_data(self, data):
|
||||
print(1)
|
||||
...
|
||||
|
||||
|
||||
# Getting the Google Sheet
|
||||
|
@ -44,7 +47,7 @@ if r.status_code != 200:
|
|||
sys.exit(1)
|
||||
|
||||
# Parsing the Sheet
|
||||
calParser = GoogleSheetsParser()
|
||||
calParser = GoogleSheetsCalParser()
|
||||
calParser.feed(r.text)
|
||||
|
||||
# Transforming the cells into events
|
||||
|
|
Reference in a new issue