From 051952997f8e399840b2a738700d589d228694ad Mon Sep 17 00:00:00 2001 From: Yash Eksambekar <49578836+samba9274@users.noreply.github.com> Date: Mon, 6 Jun 2022 18:51:51 +0530 Subject: [PATCH 1/2] Adapted to new codechef page layout (#31) --- details_soup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/details_soup.py b/details_soup.py index 0ebc175..f257b3f 100644 --- a/details_soup.py +++ b/details_soup.py @@ -56,13 +56,14 @@ def __codechef(self): global_rank = rating_ranks[0].strong.text country_rank = rating_ranks[1].strong.text - if global_rank != 'NA': + if global_rank != 'NA' and global_rank != 'Inactive': global_rank = int(global_rank) country_rank = int(country_rank) def contests_details_get(): rating_table = soup.find('table', class_='rating-table') - + if not rating_table: + return [] rating_table_rows = rating_table.find_all('td') '''Can add ranking url to contests''' From ac0a3c0cfbf1715e02f1638f9732eb895e1299ea Mon Sep 17 00:00:00 2001 From: Abhijeet Reddy Date: Mon, 6 Jun 2022 19:10:54 +0530 Subject: [PATCH 2/2] upgrade requests, urllib dependencies --- requirements.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c44676a..74267db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,9 +13,10 @@ itsdangerous==1.1.0 Jinja2==2.11.3 MarkupSafe==1.1.1 pytz==2019.3 -requests==2.22.0 +requests==2.27.1 +selenium==3.141.0 six==1.14.0 soupsieve==1.9.5 -urllib3==1.26.5 +urllib3==1.26.9 Werkzeug==0.16.1 selenium==3.141.0 \ No newline at end of file