summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/openai/har_file.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-26 21:45:53 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-26 21:45:53 +0100
commitfd92918b77e36f83a8b7a59469df35f3f23a48f1 (patch)
tree732d16b41c991c22b17683ca88e68aa62ddef834 /g4f/Provider/openai/har_file.py
parentNo arkose token and .har files (diff)
downloadgpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar.gz
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar.bz2
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar.lz
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar.xz
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.tar.zst
gpt4free-fd92918b77e36f83a8b7a59469df35f3f23a48f1.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/openai/har_file.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/openai/har_file.py b/g4f/Provider/openai/har_file.py
index 379697c2..68fe7420 100644
--- a/g4f/Provider/openai/har_file.py
+++ b/g4f/Provider/openai/har_file.py
@@ -41,9 +41,9 @@ def readHAR():
if not harPath:
raise RuntimeError("No .har file found")
for path in harPath:
- with open(path, 'r') as file:
+ with open(path, 'rb') as file:
try:
- harFile = json.load(file)
+ harFile = json.loads(file.read())
except json.JSONDecodeError:
# Error: not a HAR file!
continue