Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skulltech/webdriver-start
Reliable module for starting up Selenium Webdriver, with custom user-agent and user-profile.
https://github.com/skulltech/webdriver-start
chrome firefox htmlunit phantomjs python selenium selenium-webdriver user-agent
Last synced: 7 days ago
JSON representation
Reliable module for starting up Selenium Webdriver, with custom user-agent and user-profile.
- Host: GitHub
- URL: https://github.com/skulltech/webdriver-start
- Owner: skulltech
- License: mit
- Created: 2016-11-19T21:42:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-11T19:23:42.000Z (about 6 years ago)
- Last Synced: 2025-01-16T03:49:51.961Z (24 days ago)
- Topics: chrome, firefox, htmlunit, phantomjs, python, selenium, selenium-webdriver, user-agent
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webdriver-start
Reliable module for starting up Selenium Webdriver with custom modifications. Supports —
- Custom `user-agent`
- Custom user profile.
- Headless mode.
- Firefox and Chrome webdrivers. Open an issue if you want support for more.## Installation
Install it using pip —```console
$ pip install webdriver-start
```## Usage
For Chrome
```python
>>> from wdstart import webdriver
>>> driver = webdriver.Chrome(headless=True, user_agent='this is a custom user-agent', user_profile='/path/to/profile/')
>>> driver>>> driver.get('http://www.google.com')
>>> driver.title
'Google'
>>> driver.execute_script('return navigator.userAgent')
'this is a custom user-agent'
```Similarly, for Firefox
```python
>>> from wdstart import webdriver
>>> driver = webdriver.Firefox(headless=True, user_agent='this is a custom user-agent', user_profile='/path/to/profile/')
>>> driver>>> driver.get('http://www.google.com')
>>> driver.title
'Google'
>>> driver.execute_script('return navigator.userAgent')
'this is a custom user-agent'
```