Fix
This commit is contained in:
@@ -92,17 +92,21 @@ print(scr.header_size)
|
||||
print(scr.last_pos)
|
||||
a = scr.extract_values()
|
||||
print(a)
|
||||
b = scr.extract_strings()
|
||||
print(b)
|
||||
print(len(a), len(b))
|
||||
missing = {}
|
||||
for key in b.keys():
|
||||
if key not in a:
|
||||
missing[key] = b[key]
|
||||
for key in a.keys():
|
||||
if key not in b:
|
||||
missing[key] = a[key]
|
||||
print(missing)
|
||||
print(len(missing))
|
||||
b = None
|
||||
try:
|
||||
b = scr.extract_strings()
|
||||
print(b)
|
||||
print(len(a), len(b))
|
||||
missing = {}
|
||||
for key in b.keys():
|
||||
if key not in a:
|
||||
missing[key] = b[key]
|
||||
for key in a.keys():
|
||||
if key not in b:
|
||||
missing[key] = a[key]
|
||||
print(missing)
|
||||
print(len(missing))
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
with open(json_f, "w", encoding="utf-8") as f:
|
||||
json.dump(b, f, ensure_ascii=False, indent=2)
|
||||
json.dump(b if b else a, f, ensure_ascii=False, indent=2)
|
||||
|
||||
Reference in New Issue
Block a user