From 1547366c8599ddbd2a129d9d6d8861a319ce6924 Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Mon, 15 Sep 2025 21:32:57 +0300 Subject: [PATCH] fix: fixing body issue with cli view command --- scrapling/core/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapling/core/shell.py b/scrapling/core/shell.py index 8a38391..bc087a0 100644 --- a/scrapling/core/shell.py +++ b/scrapling/core/shell.py @@ -317,7 +317,7 @@ def show_page_in_browser(page: Selector): # pragma: no cover try: fd, fname = make_temp_file(prefix="scrapling_view_", suffix=".html") - with open(fd, "w", encoding=page.encoding) as f: + with open(fd, "wb") as f: f.write(page.body) open_in_browser(f"file://{fname}")