Skip to content

Commit 6ddd4bd

Browse files
committed
Catch TypeError when getting server IP address
1 parent 2b911a0 commit 6ddd4bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy_playwright/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ async def _download_request_with_page(self, request: Request, page: Page) -> Res
309309
self.stats.inc_value("playwright/page_count/closed")
310310

311311
server_ip_address = None
312-
with suppress(AttributeError, KeyError, ValueError):
312+
with suppress(AttributeError, KeyError, TypeError, ValueError):
313313
server_addr = await response.server_addr()
314314
server_ip_address = ip_address(server_addr["ipAddress"])
315315

0 commit comments

Comments
 (0)