mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-27 16:24:53 +00:00
Bug fix on incomplete JSON output on --per-chat #86
This commit is contained in:
@@ -579,7 +579,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
contact = jik.replace('+', '')
|
contact = jik.replace('+', '')
|
||||||
with open(f"{args.json}/{contact}.json", "w") as f:
|
with open(f"{args.json}/{contact}.json", "w") as f:
|
||||||
file_content_to_write = json.dumps(data[jik], ensure_ascii=not args.avoid_encoding_json, indent=2 if args.pretty_print_json else None)
|
file_content_to_write = json.dumps({jik: data[jik]}, ensure_ascii=not args.avoid_encoding_json, indent=2 if args.pretty_print_json else None)
|
||||||
f.write(file_content_to_write)
|
f.write(file_content_to_write)
|
||||||
print(f"Writing JSON file...({index + 1}/{total})", end="\r")
|
print(f"Writing JSON file...({index + 1}/{total})", end="\r")
|
||||||
print()
|
print()
|
||||||
|
|||||||
Reference in New Issue
Block a user