Skip to content

Commit de51877

Browse files
Merge pull request #2475 from avinashkranjan/deepsource-transform-c5a66df4
format code with autopep8
2 parents a356396 + 22a1ab4 commit de51877

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Icc_ranking_scraper/rankings.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self):
88
self.url = "https://www.icc-cricket.com/rankings/mens/"
99

1010
def team_rankings(self, format):
11-
11+
1212
try:
1313
obj_keys = ["rank", "team"]
1414
resposne_list = []
@@ -17,16 +17,15 @@ def team_rankings(self, format):
1717
soup = BeautifulSoup(response.content, "html.parser")
1818
teams = soup.find_all("span", class_="u-hide-phablet")
1919
for rank, team in enumerate(teams, 1):
20-
obj_values = [rank,team.get_text()]
20+
obj_values = [rank, team.get_text()]
2121
resposne_list.append(dict(zip(obj_keys, obj_values)))
2222

23-
2423
return resposne_list
2524
except:
2625
return None
2726

2827
def player_ranking(self, type, format):
29-
28+
3029
try:
3130
url = self.url + f"/player-rankings/{format}/{type}"
3231
response = requests.get(url)
@@ -44,4 +43,4 @@ def player_ranking(self, type, format):
4443

4544
return players_list
4645
except:
47-
return None
46+
return None

0 commit comments

Comments
 (0)