Automated Selenium bot that logs into the Share‑a‑Naan platform, loads the followers of a target account, and follows them automatically.
Includes a retry mechanism to handle temporary UI failures, slow loading, or intercepted clicks.
- Logs into the platform using stored credentials
- Opens the followers list of a specified account
- Scrolls the modal to load more followers
- Clicks all available Follow buttons
- Handles “Unfollow?” pop‑ups automatically
- Retries unstable actions (timeouts, missing elements, intercepted clicks)
Create a .env file with:
BASE_URL=https://example.com
SHARE_A_NAAN_EMAIL=your_email
SHARE_A_NAAN_PASSWORD=your_password
SIMILAR_ACCOUNT=username_to_scrape
pip install selenium python-dotenvDownload the appropriate ChromeDriver version for your browser.
The bot navigates to the login page, fills in credentials, submits the form, and dismisses optional pop‑ups.
It opens the followers modal of the target account and scrolls it multiple times to load more entries.
It clicks each Follow button.
If a click triggers an “Unfollow?” dialog, the bot selects Cancel and continues.
A simple retry function wraps each main action:
- Executes the function
- If it fails due to Selenium exceptions, retries up to 7 times
- Raises an error only after all attempts fail
from InstaFollower import InstaFollower
from retry import retry # if stored separately
insta = InstaFollower()
retry(insta.login, description="Login")
retry(insta.find_followers, description="Load Followers")
retry(insta.follow, description="Follow Users").
├── InstaFollower.py
├── main.py
├── .env
└── chrome_profile/
- The bot uses a persistent Chrome profile to reduce repeated logins.
- XPaths may need updates if the website UI changes.
- Use responsibly — automated following may violate platform rules.