# -*- coding: utf-8 -*-
r"""B56: in nguyên văn các khối tin Zalo Lộc 12/10 + đóng browser."""
import json, subprocess

j = json.load(open(r'C:\Claw 2\QC\_raw_zalo_loc_1210.json', encoding='utf-8'))
print('  === NGUYÊN VĂN CÁC KHỐI ===')
for x in j['ds']:
    print('--- #%s ảnh=%s dài=%s' % (x['i'], x['so_anh'], x['dai']))
    print(repr(x['text'])[:1500])
r = subprocess.run(['browser-act', 'session', 'close', 'loc1210'], capture_output=True, text=True, encoding='utf-8', errors='replace')
print()
print('  đóng browser:', ((r.stdout or '') + (r.stderr or '')).strip()[-90:])
