File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,11 @@ async def _fetch_all_questions(self):
4040 questionId
4141 questionFrontendId
4242 title
43- titleSlug
43+ titleSlug
44+ difficulty
45+ paidOnly: isPaidOnly
46+ hasSolution
47+ hasVideoSolution
4448 }
4549 }
4650 }"""
@@ -58,7 +62,7 @@ async def _fetch_all_questions(self):
5862 for q in questions :
5963 self .questions [q ["questionId" ]] = q
6064 self .slug_to_id [q ["titleSlug" ]] = q ["questionId" ]
61- self .frontend_id_to_slug [q ["questionFrontendId" ]] = q ["titleSlug" ]
65+ self .frontend_id_to_slug [q ["questionFrontendId" ]] = q ["titleSlug" ]
6266 except Exception as e :
6367 print (f"Error updating questions: { e } " )
6468
@@ -90,7 +94,11 @@ async def get_all_problems():
9094 "frontend_id" : q ["questionFrontendId" ],
9195 "title" : q ["title" ],
9296 "title_slug" : q ["titleSlug" ],
93- "url" : f"https://leetcode.com/problems/{ q ['titleSlug' ]} /"
97+ "url" : f"https://leetcode.com/problems/{ q ['titleSlug' ]} /" ,
98+ "difficulty" : q ["difficulty" ],
99+ "paid_only" : q ["paidOnly" ],
100+ "has_solution" : q ["hasSolution" ],
101+ "has_video_solution" : q ["hasVideoSolution" ],
94102 } for q in cache .questions .values ()]
95103
96104@app .get ("/problem/{id_or_slug}" , tags = ["Problems" ])
You can’t perform that action at this time.
0 commit comments