File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -167,25 +167,20 @@ def print_submission_result(submission): # used python-leetocde library
167167def initialize_leetcode_api_instance (
168168 leetcode_session , leetcode_csrf_token
169169): # used python-leetocde library
170- configuration = leetcode \
171- .Configuration ()
170+ configuration = leetcode .Configuration ()
172171 csrf_token = leetcode_csrf_token
173-
174172 configuration .api_key ["x-csrftoken" ] = csrf_token
175173 configuration .api_key ["csrftoken" ] = csrf_token
176174 configuration .api_key ["LEETCODE_SESSION" ] = leetcode_session
177- configuration .api_key ["Referer" ] = "https://leetcode .com"
175+ configuration .api_key ["Referer" ] = "https://.com"
178176 configuration .debug = False
179177
180- api_instance = leetcode \
181- .DefaultApi (leetcode
182- .ApiClient (configuration ))
178+ api_instance = .DefaultApi (.ApiClient (configuration ))
183179 return api_instance
184180
185181
186182def interpret_solution (title_slug , payload , api_instance ):
187- test_submission = leetcode \
188- .TestSubmission (
183+ test_submission = .TestSubmission (
189184 data_input = payload ["data_input" ],
190185 typed_code = payload ["typed_code" ],
191186 question_id = payload ["question_id" ],
You can’t perform that action at this time.
0 commit comments