This Python application automates Microsoft Edge browser searches using Playwright. It loads search queries from a text file, removes duplicates, and performs random Bing searches with human-like behavior simulation.
- π Cross-platform support (Windows, macOS, Linux)
- π Automated Edge browser control via Playwright
- π€ Real Edge profile integration with automatic copying
- π² Random query selection without repetition
- π€ Human-like typing simulation with random delays
- π Progress tracking with colored console output
- π‘οΈ Comprehensive error handling and retry logic
- π Detailed logging for debugging
- βοΈ Modern Python 3.13.4+ features
To get started quickly, follow these steps:
-
Install Python 3.13+ (if you don't already have it). Ensure
python
is on your PATH. -
Download or clone this repository.
-
Open Command Prompt as Administrator (on Windows) or elevated terminal (Linux/macOS) inside the project folder.
-
Run the automated setup script:
python setup.py
The script WILL: β’ create a dedicated virtual environment (
.venv
) β’ install every required Python package β’ download Playwright's Edge browser build β’ verify administrator privileges -
When it finishes, activate the virtual environment as instructed on-screen, then start the program:
python main.py
That's it β the setup script downloads the browser build and installs every dependency for you, so no additional manual steps are needed.
Automatic-Edge-Browser-Web-Searcher/
βββ src/
βββ main.py # Main application script
βββ process_killer.py # Utility to kill processes locking files
βββ requirements.txt # Python dependencies
βββ setup.py # Automated setup script
βββ queries.txt # Search queries (1000+ included)
βββ README.md # Documentation file
Edit queries.txt
to customize search queries:
- One query per line
- Comments start with
#
- Duplicates are automatically removed
The application automatically:
- Detects available Edge profiles
- Lists them for user selection
- Creates temporary copies to avoid conflicts
- Uses persistent browser context
If you encounter file locking issues (WinError 32) during profile copying, use these Command Prompt commands:
taskkill /f /im msedge.exe
Alternatively, you can kill specific Edge processes:
tasklist | findstr msedge
taskkill /f /pid [PID_NUMBER]
These commands will:
- Terminate all Microsoft Edge processes that may be locking files
- Free up locked profile files for copying
- Require Command Prompt to be run as Administrator
- Allow the automation script to proceed without file conflicts
Platform | Edge Profile Location | Status |
---|---|---|
Windows | %LOCALAPPDATA%\Microsoft\Edge\User Data |
β Fully Supported |
macOS | ~/Library/Application Support/Microsoft Edge |
β Supported |
Linux | ~/.config/microsoft-edge |
β Supported |
- System Detection: Identifies OS and Edge installation
- Profile Discovery: Finds available Edge user profiles
- Query Loading: Reads and deduplicates search queries
- Profile Selection: User chooses which profile to use
- Safe Copying: Creates temporary profile copy
- Browser Launch: Starts Edge with Playwright automation
- Search Execution: Performs random searches with human-like delays
- Progress Tracking: Shows real-time progress and results
Modify the args
list in main.py
to customize browser behavior:
args=[
"--no-sandbox",
"--disable-features=ImprovedCookieControls",
"--disable-sync",
# Add your custom arguments here
]
Logs are automatically saved to:
log_debug.txt
(development mode)log_release.txt
(production mode)
The application includes robust error handling for:
- Network connectivity issues
- Browser launch failures
- Profile access problems
- Search execution errors
- Profile Isolation: Uses temporary profile copies
- No Data Collection: All searches are performed locally
- Safe Automation: Respects browser security features
- Clean Cleanup: Temporary files are managed automatically
"Playwright not installed"
pip install playwright
playwright install
"No Edge profiles found"
- Ensure Microsoft Edge is installed and has been run at least once
- Check if Edge profiles exist in the expected location
"Browser launch failed"
- Try running with administrator privileges
- Ensure Edge browser is not running
- Check antivirus software isn't blocking automation
"Permission denied"
- Close all Edge browser windows
- Run terminal/command prompt as administrator
- Check file permissions in the project directory
Run with Python's debug flag for verbose output:
python -O main.py # Optimized mode
python main.py # Debug mode (default)
- Startup Time: ~2-5 seconds
- Search Speed: ~3-5 seconds per query
- Memory Usage: ~50-100MB
- CPU Usage: Low during searches
This Python version maintains all core features from the original C# implementation:
- Edge profile management
- Query deduplication
- Human-like search simulation
- Progress tracking
- Error handling and retries
- Logging system
- Cross-platform compatibility
- Modern Python async/await patterns
- Enhanced error messages
- Improved profile copying
- Better OS detection
- Removed Windows 10 restriction
- Simplified browser installation
- Enhanced cross-platform support
- Modern Python 3.13.4+ features
This project is licensed under the terms specified in the LICENSE file.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
For issues and questions:
- Check the troubleshooting section
- Review the log files
- Create an issue with detailed information
Made with β€οΈ using Python 3.13.4+ and Playwright