Skip to content

Commit 2d1d20e

Browse files
committedAug 19, 2020
fixed: bug caused for penalized users
1 parent 3254a55 commit 2d1d20e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎details_soup.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ def contest_rating_details_get():
8686
start_ind = page.text.find('[', page.text.find('all_rating'))
8787
end_ind = page.text.find(']', start_ind) + 1
8888

89-
all_rating = json.loads(page.text[start_ind: end_ind])
89+
next_opening_brack = page.text.find('[', start_ind+1)
90+
while next_opening_brack < end_ind:
91+
end_ind = page.text.find(']', end_ind+1) + 1
92+
next_opening_brack = page.text.find('[', next_opening_brack+1)
9093

94+
all_rating = json.loads(page.text[start_ind: end_ind])
9195
for rating_contest in all_rating:
9296
rating_contest.pop('color')
9397

0 commit comments

Comments
 (0)