Fix Instagram login selectors for new form structure #178
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.
Instagram changed their login form HTML structure, removing the 'name' attributes from input fields. This commit updates the selectors to use 'type' attributes instead, which are more stable.
Changes:
This PR fixes the login failure issue caused by Instagram's recent changes to their login form HTML structure.
Problem
Instagram removed the
nameattributes from the username and password input fields, causing the bot to fail when attempting to login. The current selectors (input[name="email"]andinput[name="pass"]) no longer work.Solution
Updated the selectors to use the
typeattribute instead, which is more stable:input[type="text"]for the username fieldinput[type="password"]for the password fieldChanges
waitForSelectorwith explicit timeout for better error handlingTesting
Related Issue
Fixes #177
Checklist
This fixes the login failure issue reported by SimpleInstaBot users.