Fixing a bug with reading response bytes in playwright/camoufox when network_idle is used
PlayWright doesn't provide a way to get the response in bytes after all wait ends like `page.content()` so that's more efficient to do anyway
This commit is contained in:
@@ -114,7 +114,7 @@ class CamoufoxEngine:
|
|||||||
response = Response(
|
response = Response(
|
||||||
url=res.url,
|
url=res.url,
|
||||||
text=page.content(),
|
text=page.content(),
|
||||||
body=res.body(),
|
body=page.content().encode('utf-8'),
|
||||||
status=res.status,
|
status=res.status,
|
||||||
reason=res.status_text,
|
reason=res.status_text,
|
||||||
encoding=encoding,
|
encoding=encoding,
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ class PlaywrightEngine:
|
|||||||
response = Response(
|
response = Response(
|
||||||
url=res.url,
|
url=res.url,
|
||||||
text=page.content(),
|
text=page.content(),
|
||||||
body=res.body(),
|
body=page.content().encode('utf-8'),
|
||||||
status=res.status,
|
status=res.status,
|
||||||
reason=res.status_text,
|
reason=res.status_text,
|
||||||
encoding=encoding,
|
encoding=encoding,
|
||||||
|
|||||||
Reference in New Issue
Block a user