Skip to content

Conversation

@riacrdodoria
Copy link

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:

  • Replace input[name='email'] with input[type='text']
  • Replace input[name='pass'] with input[type='password']
  • Add proper element validation with waitForSelector## Description

This PR fixes the login failure issue caused by Instagram's recent changes to their login form HTML structure.

Problem

Instagram removed the name attributes from the username and password input fields, causing the bot to fail when attempting to login. The current selectors (input[name="email"] and input[name="pass"]) no longer work.

Solution

Updated the selectors to use the type attribute instead, which is more stable:

  • input[type="text"] for the username field
  • input[type="password"] for the password field

Changes

  • Added waitForSelector with explicit timeout for better error handling
  • Added element existence validation before use
  • Improved error messages for debugging
  • Updated comments to explain the change

Testing

  • Tested with Instagram's current interface (February 2026)
  • Login process works successfully with the new selectors
  • No breaking changes to existing functionality

Related Issue

Fixes #177

Checklist

  • Code follows the project's coding standards
  • Changes are backwards compatible
  • Comments added to explain the changes
  • Tested with current Instagram interface
  • Add error handling for missing input fields
  • Improve code comments explaining the change

This fixes the login failure issue reported by SimpleInstaBot users.

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:
- Replace input[name='email'] with input[type='text']
- Replace input[name='pass'] with input[type='password']
- Add proper element validation with waitForSelector
- Add error handling for missing input fields
- Improve code comments explaining the change

This fixes the login failure issue reported by SimpleInstaBot users.
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.

Login failure: Instagram changed form selectors (name attributes removed)

1 participant