8000 dataclasses support · Coderbeep/LeetCode-CLI@5a16a62 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5a16a62

Browse files
committed
dataclasses support
1 parent fc1fa85 commit 5a16a62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

leetcode/models/problem_by_id_slug.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ def _execute(self, args):
9797
choosen_number = randint(1, total)
9898
while True:
9999
list_instance = ProblemsetQuestionList({'status': 'NOT_STARTED'}, limit=1, skip=choosen_number - 1)
100-
problem = list_instance.fetch_data()['problemsetQuestionList']['questions'][0]
101-
if not problem['paidOnly']:
100+
problem = list_instance.fetch_data(list_instance.params).questions[0]
101+
if not problem.paidOnly:
102102
break
103103
choosen_number = randint(1, total)
104104

105105
with Loader('Fetching problem contents...', ''):
106-
question_info_table = QuestionInfoTable(problem['titleSlug'])
107-
question_content = QuestionContent(problem['titleSlug'])
106+
question_info_table = QuestionInfoTable(problem.titleSlug)
107+
question_content = QuestionContent(problem.titleSlug)
108108
console.print(question_info_table)
109109
console.print(question_content)
110110

0 commit comments

Comments
 (0)
0