Selenium
Selenium is a tool that helps automate web browser interactions for website testing and more.
To integrate Selenium with Oxylabs Mobile Proxies, follow the instructions below:
Step 1. Install Selenium Wire to extend Selenium's Python bindings because using the default Selenium module for implementing proxies that require authentication makes the whole process complicated. You can do it using the pip
command: pip install selenium-wire
Another recommended package for this integration is webdriver-manager
. It's a package that simplifies the management of binary drivers for different browsers. In this case, there's no need to manually download a new version of a web driver after each update.
You can install the webdriver-manager
using the pip
command as well: pip install webdriver-manager
Step 2. Specify your account credentials for proxies to work:
USERNAME = "your_username"
PASSWORD = "your_password"
ENDPOINT = "pr.oxylabs.io:7777"
You'll need to adjustyour_username
and your_password
fields with the username and password of your proxy user.
You can create and manage your proxy users in our dashboard.
Step 3. Check if the proxy is working by visiting ip.oxylabs.io. If everything is working correctly - it will return an IP address of a proxy you're using.
Complete code for Oxylabs' Mobile Proxies integration with Selenium:
If you want to learn more about web scraping with Selenium, read our blog post.
Find the original Selenium integration blog post here.
Last updated