Skip to content

Commit

Permalink
fix: add problem_spans_iterator
Browse files Browse the repository at this point in the history
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
  • Loading branch information
Dup4 committed Apr 18, 2024
1 parent b697448 commit e0bb729
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"pyright",
"pytest",
"Referer",
"thead",
"tkind",
"tmember",
"XCPCIO",
Expand Down
6 changes: 6 additions & 0 deletions xcpcio_board_spider/spider/domjudge/v2/domjudge.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ def trs_iterator(self):

yield tr

def problem_spans_iterator(self):
thead = self.soup.select('thead')[0]
spans = thead.find_all('span', class_='badge problem-badge')
for span in spans:
yield span

def parse_contest(self):
self.contest.problem_id = []
self.contest.balloon_color = []
Expand Down

0 comments on commit e0bb729

Please sign in to comment.