Files
baseball-automation/verify_runner_sync.py
2026-05-02 11:12:13 +09:00

16 lines
716 B
Python

import json
path = 'output/20260408HHSK02026_report.json'
with open(path, encoding='utf-8') as f:
data = json.load(f)
for gc in data.get('game_contents', []):
for ev in gc.get('events', []):
if ev.get('batter') and '오재원' in ev.get('batter'):
print(f"At-bat: {ev.get('batter')}")
for p in ev.get('pitches', []):
print(f" Pitch {p.get('pitchNo')}: {p.get('pitchResultText')}")
if p.get('runnerEvents'):
for rev in p.get('runnerEvents'):
print(f" Runner Event: {rev.get('text')}")
print(f" At-bat Runner Events: {ev.get('runnerEvents')}")