Fix Instagram detection method to use error message instead of status_code #2321
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.
Summary: This PR updates the detection method for Instagram usernames in Sherlock's data.json file. Previously, Sherlock was relying on the HTTP status code (status_code) to determine whether a username was claimed or unclaimed. However, Instagram now returns an error message instead of a 404 status code for unclaimed usernames. This update switches the detection method to use the error message approach.
Changes Made:
Rationale: Instagram no longer returns a 404 Not Found for unclaimed usernames. Instead, it displays an error message. This caused Sherlock's detection to fail when looking for Instagram usernames. By switching to the message detection method, Sherlock can now reliably check for the existence of Instagram usernames.
Testing:
1.Tested with known claimed usernames (e.g., "instagram").
2.Tested with made-up usernames to confirm unclaimed detection (e.g., "nonexistusername123").
3.Results were accurate based on Instagram's current behavior.