aropan / clist

Your comprehensive guide to global programming contests. Track events, get details, and never miss a competition.

Home Page:https://clist.by

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support questionFrontendId for leetcode.com

chinesedfan opened this issue · comments

Now clist invokes https://leetcode.com/contest/api/info/{contestSlug}/ to get question_id, which is different with the id that we see in browsers.

For example, "1791. Find Center of Star Graph", question_id is 1916, but questionFrontendId is 1791.

FYI, I find it can be queried by GraphQL. Not sure whether it can be implemented by clist. You can also search in Github and find more examples.

// https://leetcode.com/graphql/, the request payload is,
{"query":"\n    query questionTitle($titleSlug: String!) {\n  question(titleSlug: $titleSlug) {\n    questionId\n    questionFrontendId\n    title\n    titleSlug\n    isPaidOnly\n    difficulty\n    likes\n    dislikes\n    categoryTitle\n  }\n}\n    ","variables":{"titleSlug":"find-center-of-star-graph"},"operationName":"questionTitle"}
image Added `id` field by default for leetcode.com resource.

@aropan Did you refresh all leetcode's problems, or just recent contests?