Skip to content

Commit 4135a69

Browse files
authored
Merge pull request #22 from prius/dev-batch-api
Speed up 8 times
2 parents 98dfdcd + e7c7d55 commit 4135a69

File tree

1 file changed

+1
-45
lines changed

1 file changed

+1
-45
lines changed

leetcode_anki/helpers/leetcode.py

+1-45
Original file line numberDiff line numberDiff line change
@@ -164,67 +164,23 @@ def _get_problems_data_page(
164164
skip: $skip
165165
filters: $filters
166166
) {
167-
total: totalNum
168167
questions: data {
169-
questionId
170168
questionFrontendId
171-
boundTopicId
172169
title
173170
titleSlug
174171
categoryTitle
175-
frequency
176172
freqBar
177173
content
178-
translatedTitle
179174
isPaidOnly
180175
difficulty
181176
likes
182177
dislikes
183-
isLiked
184-
isFavor
185-
similarQuestions
186-
contributors {
187-
username
188-
profileUrl
189-
avatarUrl
190-
__typename
191-
}
192-
langToValidPlayground
193178
topicTags {
194179
name
195180
slug
196-
translatedName
197-
__typename
198-
}
199-
companyTagStats
200-
codeSnippets {
201-
lang
202-
langSlug
203-
code
204-
__typename
205181
}
206182
stats
207-
acRate
208-
codeDefinition
209183
hints
210-
solution {
211-
id
212-
canSeeDetail
213-
__typename
214-
}
215-
hasSolution
216-
hasVideoSolution
217-
status
218-
sampleTestCase
219-
enableRunCode
220-
metaData
221-
translatedContent
222-
judgerAvailable
223-
judgeType
224-
mysqlSchemas
225-
enableTestMode
226-
envInfo
227-
__typename
228184
}
229185
}
230186
}
@@ -258,7 +214,7 @@ def _get_problems_data(
258214
start = self._start
259215
stop = min(self._stop, problem_count)
260216

261-
page_size = min(50, stop - start + 1)
217+
page_size = min(3000, stop - start + 1)
262218

263219
problems: List[
264220
leetcode.models.graphql_question_detail.GraphqlQuestionDetail

0 commit comments

Comments
 (0)