codeforces provider
This commit is contained in:
parent
911449986c
commit
5709d5e466
2 changed files with 116 additions and 3 deletions
|
@ -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__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue