The Instagram Automation Tool is a framework designed to automate various Instagram-related tasks, combining both file processing and web automation using Selenium WebDriver. It supports operations such as:
- Displaying follow requests
- Managing blocked profiles
- Automating interactions with Instagram (e.g., unliking posts)
The tool supports persistent login, improving user experience and execution efficiency. Users log in once, and the session is maintained for the duration of the program's lifecycle, avoiding repeated sign-ins for each Selenium-based task.
- Credentials Security: Saved credentials are encrypted using the Windows Data Protection API, ensuring they are machine-specific and secure.
- The tool checks for previously saved credentials.
- Users can choose to reuse the saved credentials or overwrite them with new ones.
- Credentials are saved in a specified file path.
- Passwords are encrypted and can only be decrypted on the same machine.
- Workflow
- Users input the username of the profile to process.
- The tool verifies access and checks if the profile is being followed.
- Followers and following data are extracted.
- The tool compares current data with previously saved data:
- Identify new followers/following
- Detect users who unfollowed or were removed
- Current data can be saved for future comparisons.
- Workflow
- The tool navigates to the activity section of the user's profile.
- It systematically unlikes posts until no more posts exist or spam detection occurs.
- The tool supports unliking up to 500-600 posts per session.
- Workflow
- Users upload a JSON or HTML file containing request data.
- The tool identifies all pending requests from the uploaded file.
- Users can decline all requests with a single command.
- Workflow
- Users can confirm or delete all received requests at once.
- Actions are performed automatically based on user input.
- Manage Blocked Profiles: View and manage blocked accounts.
- Manage Close Friends: Update your close friends list efficiently.
Instagram tasks require handling both static data (file-based operations) and dynamic interactions (via web automation). The challenges include ensuring smooth interaction between these two modules, managing login sessions, and avoiding repetitive logins for Selenium-based tasks.
- Persistent Login: Log in once at the start of the program, and the session is maintained throughout the lifecycle.
- Settings XML: Customize browser behavior, including enabling headless mode and bypassing bot detection.
- File Format Strategies: Unified approach to process multiple file formats (JSON, HTML) with minimal user input.
- Browser Detection: Automated handling of Firefox Developer Edition setup to simplify configuration.
Adjust the settings.xml
file to customize browser behavior, such as enabling headless mode and bypassing bot detection.
Run the tool and log in to Instagram. The login session will persist for subsequent tasks.
When prompted, enter the operation number corresponding to the task you want to perform. For example:
Command (Enter a number for command or type 'exit' to quit) > 9
If you select a file-based operation (e.g., operation 8), you will be asked to provide the file path:
Command (Enter a number for command or type 'exit' to quit) > 8
Enter the file path to proceed > C:/Users/username/Documents/instagram_data.json
After entering the file path, the operation will proceed and the relevant data will be processed and displayed.
Contributions are welcome! If you have an idea for a new feature, bug fix, or improvement, feel free to fork the repository and submit a pull request.
If you find this tool helpful, you can support its development by buying me a coffee: buymeacoffee.com