codeforces provider

This commit is contained in:
Dima Gerasimov 2019-04-04 22:30:54 +01:00
parent 911449986c
commit 5709d5e466
2 changed files with 116 additions and 3 deletions

View file

@ -20,10 +20,14 @@ class Competition(NamedTuple):
@cproperty
def uid(self) -> str:
return self.contest
return self.contest_id
@property
def contest_id(self) -> str:
return self.json['challengeId']
def __hash__(self):
return hash(self.json['challengeId'])
return hash(self.contest_id)
@cproperty
def contest(self) -> str:
@ -80,9 +84,10 @@ def main():
for d in iter_data():
try:
d = unwrap(d)
print(d.summary)
except Exception as e:
print(f'ERROR! {d}')
else:
print(d.summary)
if __name__ == '__main__':