From 7d9a178ece571a4c0e545851c9dd22402eeedea3 Mon Sep 17 00:00:00 2001 From: Cloud11665 Date: Mon, 3 May 2021 20:41:43 +0200 Subject: [PATCH] increase the number of fetched results fix id type --- koishi/contest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koishi/contest.py b/koishi/contest.py index fa342e4..4ae320e 100644 --- a/koishi/contest.py +++ b/koishi/contest.py @@ -117,12 +117,13 @@ def result(self) -> Result: @property def results(self) -> List[Result]: """A list of latest results.""" - resp = self._ses.get(f"https://satori.tcs.uj.edu.pl/contest/{self.id}/results?results_limit=256") + resp = self._ses.get(f"https://satori.tcs.uj.edu.pl/contest/{self.id}/results?results_limit=4096") dom = lxml.html.fromstring(resp.text) out = [] for tr in dom.xpath(r"//table[@class='results']/tr[position()!=1]"): id = xpstr(tr, r".//td[1]/a/text()") + id = int(id) src = xpstr(tr, r".//td[2]/text()") date = xpstr(tr, r".//td[3]/text()")