fix(fetchers): More accurate collection of the final response

This will make the `response.body` return the raw response for text/json responses as well
This commit is contained in:
Karim shoair
2025-10-12 04:12:18 +03:00
parent 6bfa266c90
commit 073c4910d4
3 changed files with 11 additions and 11 deletions
+2
View File
@@ -344,6 +344,7 @@ class StealthySession(StealthySessionMixin, SyncSession):
if (
finished_response.request.resource_type == "document"
and finished_response.request.is_navigation_request()
and finished_response.request.frame == page_info.page.main_frame
):
final_response = finished_response
@@ -676,6 +677,7 @@ class AsyncStealthySession(StealthySessionMixin, AsyncSession):
if (
finished_response.request.resource_type == "document"
and finished_response.request.is_navigation_request()
and finished_response.request.frame == page_info.page.main_frame
):
final_response = finished_response