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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user