feat: add Chaturbate username scan module#424
Merged
Conversation
Add username-based Chaturbate check under user_scan/adult via the registration form's ajax_validate_register_form endpoint: an "already taken" username error means the account exists, no error means available. Email checking is not viable (the endpoint returns only email format/ deliverability errors, never an already-registered signal).
The register check only reports availability, so on a hit fetch the public biocontext API and capture real name, location, age, gender, follower count, languages, bio and social links via Result.taken(extra=...). The biocontext endpoint needs a browser User-Agent or it serves an HTML challenge instead of JSON, so the same UA used for the check is passed through.
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.
What
Adds a username-based Chaturbate check to
user_scan/adult/.How it works
Chaturbate profile pages sit behind an age gate, so this uses the registration form's field-validation endpoint instead (an async module, since it needs the Django CSRF two-request flow):
GET /accounts/register/→ extractcsrfmiddlewaretoken(+ thecsrftokencookie).POST /accounts/ajax_validate_register_form/withusername.errors.username= "Username is already taken."usernameerrorField validation runs before the reCAPTCHA check, so no captcha token is needed. The user-facing
show_urlpoints at the profile page/{user}/.Notes
/{user}/profile), but that path now redirects to the age gate; the register-validate endpoint is a cleaner, explicit signal.Testing
cute18cute,brunolm7→ Found; random valid names → Not Found; too-short names → Error.pytest tests/: all pass except 2 pre-existing Windowschmod(0)no-op tests, unrelated to this change.