Fix bugs and improve robustness of report fetching

- Fix missing 'import sys' in get_report.py that caused a NameError
  on the credential-check error path
- Fix indentation of the per-report print statement in
  report_json_down.py so it prints for every report, not just the
  last one per date
- Replace hardcoded X-ENROLLMENT header value with dynamic extraction
  from selenium-wire intercepted requests
- Replace fragile time.sleep() calls with WebDriverWait so the script
  waits for actual page/login readiness rather than fixed delays
- Remove album_json_down.py, a Windows-only legacy script inherited
  from upstream that was never used in this fork
This commit is contained in:
Jeena 2026-03-18 00:37:35 +00:00
parent d9a45bd317
commit 0ada2d4858
3 changed files with 26 additions and 190 deletions

View file

@ -124,7 +124,7 @@ for date, reports in sorted(reports_by_date.items()):
except requests.RequestException as e:
print(f"Image download failed: {e}")
print(f"Report {report_index} (ID: {report['id']}) saved in '{folder}'")
print(f"Report {report_index} (ID: {report['id']}) saved in '{folder}'")
print("All reports have been processed.")