Skip to content

Conversation

@Fort503
Copy link
Contributor

@Fort503 Fort503 commented Dec 9, 2025

Title

Add StackOverflow username validator

Description

This Pull Request adds a new validator for StackOverflow, located in community/stackoverflow.py

The StackOverflow user search endpoint:

https://stackoverflow.com/users/filter?search=

always returns HTTP 200, regardless of whether the user exists or not. Therefore, the validator uses generic_validate() and inspects the HTML response body.

The detection logic follows these rules:

  • If the response contains the text "No users matched your search." → the username is available.
  • If the response contains an exact-match HTML pattern: >{username}< → the username is taken.
  • If neither condition is met, the username is treated as available, which also avoids false positives from partial matches.

@VamatoHD VamatoHD self-requested a review December 9, 2025 22:55
Copy link
Collaborator

@VamatoHD VamatoHD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation looks solid! I ran some tests, and it appears to work perfectly.
I'll run some more tests and hopefully approve.

Co-authored-by: Vamato <62358492+VamatoHD@users.noreply.github.com>
@Fort503 Fort503 closed this Dec 10, 2025
Copy link
Contributor Author

@Fort503 Fort503 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor Author

@Fort503 Fort503 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@kaifcodec
Copy link
Owner

Wait @Fort503 Why you closed the PR? I think you misunderstood, your PR is perfectly fine we were just discussing about changes.

@kaifcodec kaifcodec reopened this Dec 10, 2025
@Fort503
Copy link
Contributor Author

Fort503 commented Dec 10, 2025

Oh, alright, alright, thanks.

@kaifcodec kaifcodec linked an issue Dec 10, 2025 that may be closed by this pull request
@kaifcodec
Copy link
Owner

@VamatoHD Do you want to make any changes? Or else I am going to merge it just let me know.

@kaifcodec kaifcodec requested a review from VamatoHD December 10, 2025 14:10
@kaifcodec kaifcodec merged commit dab8f73 into kaifcodec:main Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add StackOverflow username validator

3 participants