Method to change User Agent string
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 718
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
I have a pet project similar to Nomorobo. It monitors a phone line and screens calls based on Caller ID. My program also performs a carrier call trace and files FCC and FTC complaints using Python and Selenium.
I would like a way to change the User Agent string when driving the browser for the FCC and FTC complaints. It looks like there are per-browser methods (like here for Chrome), but I don't see a unified way to do it.
I would also like a method to query a User Agent string. I need to do this to preserve most of the existing string. Preserving most of the existing string is important so the remote server (FCC and FTC servers) still recognize the browser.
So putting them together, I would like to do something like this in my software:
driver = webdriver.Chrome(...)
agent = webdriver.get_user_agent()
driver.set_user_agent(agent + " (Callboot Call Manager)")
or
driver = webdriver.Firefox(...)
agent = webdriver.get_user_agent()
driver.set_user_agent(agent + " (Callboot Call Manager)")
Changing the user agent string is a courtesy to the remote system owners, like the FCC and FTC. I also don't want them to think their systems are under attack by unknown ARM devices and possibly reject the complaints that are being filed.
Please consider adding an interface to query and change User Agent strings.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by examining the WebDriver specification's existing user-agent interface and the browser-specific behavior referenced in the issue. Done would require a decided unified way to query and change the user-agent string across browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100