Skip to content

Commit

Permalink
Merge pull request #22 from prius/dev-batch-api
Browse files Browse the repository at this point in the history
Speed up 8 times
  • Loading branch information
fspv authored Oct 27, 2021
2 parents 98dfdcd + e7c7d55 commit 4135a69
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions leetcode_anki/helpers/leetcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,67 +164,23 @@ def _get_problems_data_page(
skip: $skip
filters: $filters
) {
total: totalNum
questions: data {
questionId
questionFrontendId
boundTopicId
title
titleSlug
categoryTitle
frequency
freqBar
content
translatedTitle
isPaidOnly
difficulty
likes
dislikes
isLiked
isFavor
similarQuestions
contributors {
username
profileUrl
avatarUrl
__typename
}
langToValidPlayground
topicTags {
name
slug
translatedName
__typename
}
companyTagStats
codeSnippets {
lang
langSlug
code
__typename
}
stats
acRate
codeDefinition
hints
solution {
id
canSeeDetail
__typename
}
hasSolution
hasVideoSolution
status
sampleTestCase
enableRunCode
metaData
translatedContent
judgerAvailable
judgeType
mysqlSchemas
enableTestMode
envInfo
__typename
}
}
}
Expand Down Expand Up @@ -258,7 +214,7 @@ def _get_problems_data(
start = self._start
stop = min(self._stop, problem_count)

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

problems: List[
leetcode.models.graphql_question_detail.GraphqlQuestionDetail
Expand Down

0 comments on commit 4135a69

Please sign in to comment.