Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rankings.py #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions power_of_10/rankings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_rankings(year, gender, age_group, event, region=None):
- 'athlete_id' (int): Reference id of athlete (used by PowerOf10)
- 'meeting_id' (int): Reference id of event (used by PowerOf10)
'''
if None in (year, region, gender, age_group, event):
if None in (year, gender, age_group, event):
raise QueryError('Please ensure all search fields are filled.')

url = f'https://www.thepowerof10.info/rankings/rankinglist.aspx?event={event.replace(" ","+")}&agegroup={age_group}&sex={gender}&year={year}'
Expand Down Expand Up @@ -66,4 +66,4 @@ def get_rankings(year, gender, age_group, event, region=None):
'meeting_id': str(dets[11]).split('=')[2].split('&')[0]
})

return rankings
return rankings