Skip to content

Commit

Permalink
fix(parser): AJC count should be None if no AJCs
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed Mar 18, 2024
1 parent 69529ad commit 58fbcc6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions chunithm_net/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,9 @@ def parse_music_record(soup: BeautifulSoup, song_id: int) -> list[MusicRecord]:
is not None
else "0"
),
ajc_count=chuni_int(
elem.get_text()
if (elem := block.select_one(".musicdata_score_theory_num")) is not None
else "0"
),
ajc_count=chuni_int(elem.get_text())
if (elem := block.select_one(".musicdata_score_theory_num")) is not None
else None,
)
score.extras[KEY_SONG_ID] = song_id

Expand Down

0 comments on commit 58fbcc6

Please sign in to comment.