Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit b7d3444

Browse files
committed
Fix issue with using exit()
1 parent efc066e commit b7d3444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Scripts/Web_Scrappers/codeforces_ratings_scraper/cf_ratings.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ def call_api(handle):
88
base_url='https://codeforces.com/api/user.rating?handle='
99
#Append the user
1010
url=base_url+handle
11-
11+
#Send request
1212
r = requests.get(url)
1313
raw = r.json()
14-
14+
#Parse response
1515
response=json.dumps(raw['result'])
1616

1717
return(response)
@@ -20,7 +20,7 @@ def call_api(handle):
2020
#Check how many arguments were supplied
2121
if len(sys.argv)>3:
2222
print('Too many arguments.')
23-
exit()
23+
sys.exit(1)
2424

2525
#Create parser
2626
parser = argparse.ArgumentParser(description='Scrape user ratings from codeforce.')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /