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:
Karim shoair
2024-11-20 12:33:54 +02:00
parent 14738030e0
commit 4c74d9bc97
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ class CamoufoxEngine:
response = Response(
url=res.url,
text=page.content(),
body=res.body(),
body=page.content().encode('utf-8'),
status=res.status,
reason=res.status_text,
encoding=encoding,
+1 -1
View File
@@ -224,7 +224,7 @@ class PlaywrightEngine:
response = Response(
url=res.url,
text=page.content(),
body=res.body(),
body=page.content().encode('utf-8'),
status=res.status,
reason=res.status_text,
encoding=encoding,