Skip to content

Commit

Permalink
fix: fix issue that csrf token cannot be retrieved when directly land…
Browse files Browse the repository at this point in the history
… on problem list page
  • Loading branch information
icelam committed Dec 5, 2023
1 parent 70bfc16 commit 6ae9b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_question_of_today():
client = requests.session()

# Visit leetcode webpage to retrieve a CSRF token first
client.get(LEETCODE_ALL_PROBLEM_URL)
client.get(LEETCODE_DOMAIN)

if 'csrftoken' in client.cookies:
csrftoken = client.cookies['csrftoken']
Expand Down

0 comments on commit 6ae9b15

Please sign in to comment.