Skip to content

Commit

Permalink
fix: code line order
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnyxt committed Oct 15, 2023
1 parent 16d3c42 commit 2750ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch_problems_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def get_csrftoken():
'https://leetcode.com/problemset/all/',
redirect=False
)
raise RuntimeError('Fail to get csrftoken! status: %d, data: %s' % (r.status, r.data))
if r.status != 200:
raise RuntimeError('Fail to get csrftoken! status: %d, data: %s' % (r.status, r.data))
match_obj = re.search('csrftoken=(\S+); ', r.headers['Set-Cookie'])
if match_obj:
return match_obj.group(1)
Expand Down

0 comments on commit 2750ace

Please sign in to comment.