G7 공개 캡처 경로 보정

This commit is contained in:
Yun Chan 2026-08-09 22:36:25 +09:00
parent c743e9ccb9
commit b34623f3db
2 changed files with 45 additions and 0 deletions

View file

@ -27,6 +27,10 @@ SNAPSHOT_SCHEMA_VERSION = "vignette.voice-runtime.v1"
MAX_SAMPLES = 7_200
MAX_INTERVAL_SECONDS = 60.0
MAX_CAPTURE_WINDOW_SECONDS = 7_200.0
_BROWSER_UA = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/140.0 Safari/537.36"
)
class EvidenceFailure(RuntimeError):
@ -158,6 +162,9 @@ def fetch_snapshot(
headers={
"Accept": "application/json",
"Cookie": f"{cookie_name}={cookie_value}",
# Cloudflare는 Python urllib 기본 User-Agent를 공개 API 도달 전에
# 거부한다. 공개 배포 probe와 같은 브라우저 호환 전송 경계를 쓴다.
"User-Agent": _BROWSER_UA,
},
method="GET",
)