Fix LeetCode detection via GraphQL API - #3069
Open
siddharthaasal wants to merge 1 commit into
Open
Conversation
LeetCode moved profiles to /u/{username}/ and now serves 403 for all
direct profile requests, breaking status_code detection (every username
reported as not found).
Switch to LeetCode's GraphQL API (matchedUser query) and detect the
"That user does not exist." error message, mirroring the existing
Anilist entry. Also updates the display url to the new /u/{}/ path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Automatic validation of changes
|
Author
|
hi, any updates on this? is there anything on my end that I can offer help with? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
LeetCode is currently reported as not found for every username. Two things changed on LeetCode's side:
https://leetcode.com/{}tohttps://leetcode.com/u/{}/.status_codedetection can never succeed.Fix
Switch LeetCode to its public GraphQL API (
matchedUserquery) and detect the"That user does not exist."error message returned for missing users. This mirrors the existing Anilist entry, which already uses aPOST+ GraphQLurlProbe+request_payloadpattern. The displayurlis also updated to the new/u/{}/path.Testing
test_manifest.pyschema validation — passestest_validate_targets.pyfalse-negative (LeetCode) — passes (known user → Claimed)test_validate_targets.pyfalse-positive (LeetCode) — passes (random users → Available)Verified manually:
sherlock siddharthaasal --site LeetCode→ found