Skip to content

Commit 0519529

Browse files
authored
Adapted to new codechef page layout (#31)
1 parent 6105630 commit 0519529

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: details_soup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ def __codechef(self):
5656
global_rank = rating_ranks[0].strong.text
5757
country_rank = rating_ranks[1].strong.text
5858

59-
if global_rank != 'NA':
59+
if global_rank != 'NA' and global_rank != 'Inactive':
6060
global_rank = int(global_rank)
6161
country_rank = int(country_rank)
6262

6363
def contests_details_get():
6464
rating_table = soup.find('table', class_='rating-table')
65-
65+
if not rating_table:
66+
return []
6667
rating_table_rows = rating_table.find_all('td')
6768

6869
'''Can add ranking url to contests'''

0 commit comments

Comments
 (0)