mirror of
https://github.com/bspeice/metrik
synced 2024-11-23 15:48:10 -05:00
HTMLParser is old-style in python 2?
This commit is contained in:
parent
e9228d6dad
commit
f9caa2555a
@ -22,7 +22,13 @@ class BloombergEquityInfo(Task):
|
|||||||
class EquityInfoParser(HTMLParser):
|
class EquityInfoParser(HTMLParser):
|
||||||
|
|
||||||
def __init__(self, keys):
|
def __init__(self, keys):
|
||||||
|
# This call isn't safe because python 2 HTMLParser is an
|
||||||
|
# old-style class
|
||||||
|
try:
|
||||||
super(EquityInfoParser, self).__init__()
|
super(EquityInfoParser, self).__init__()
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
self.keys = keys
|
self.keys = keys
|
||||||
self.records = {k: None for k in keys}
|
self.records = {k: None for k in keys}
|
||||||
self.do_record = {k: False for k in keys}
|
self.do_record = {k: False for k in keys}
|
||||||
|
Loading…
Reference in New Issue
Block a user