Skip to content

Commit a0104c8

Browse files
Merge pull request #24 from slimshreydy/main
Fixes #23, error with headless mode where user agent tuple is incorrectly processed
2 parents de62d2a + b5970d6 commit a0104c8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- Fix `AttributeError: 'tuple' object has no attribute 'value'` error in `connection.py` when using headless browser, @slimshreydy
13+
1214
### Added
1315

1416
### Changed

zendriver/core/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ async def _prepare_headless(self):
505505
allow_unsafe_eval_blocked_by_csp=True,
506506
)
507507
)
508-
if response and response.value:
509-
ua = response.value
508+
if response and response[0].value:
509+
ua = response[0].value
510510
await self._send_oneshot(
511511
cdp.network.set_user_agent_override(
512512
user_agent=ua.replace("Headless", ""),

0 commit comments

Comments
 (0)