Update har_capture_reader.py

Added UTF-8 encoding to HAR capture reader
pull/7/head
Brad Russell 3 years ago
parent 9bcc575de2
commit 602a6c492c

@ -71,7 +71,7 @@ class HarCaptureReader:
self.progress_callback = progress_callback self.progress_callback = progress_callback
def captured_requests(self) -> Iterator[HarFlowWrapper]: def captured_requests(self) -> Iterator[HarFlowWrapper]:
har_file_size = os.path.getsize(self.file_path) har_file_size = os.path.getsize(self.file_path)
with open(self.file_path, 'r') as f: with open(self.file_path, 'r', encoding='utf-8') as f:
data = json_stream.load(f) data = json_stream.load(f)
for entry in data['log']['entries'].persistent(): for entry in data['log']['entries'].persistent():
if self.progress_callback: if self.progress_callback:

Loading…
Cancel
Save