Prefer AMSC sessionId over stale cookie

This commit is contained in:
2569718930@qq.com
2026-06-15 00:57:10 +08:00
parent 59f19407cb
commit f98ab4a9fe
3 changed files with 65 additions and 6 deletions
+3 -3
View File
@@ -1400,11 +1400,11 @@ def _build_amsc_awos_headers() -> dict[str, str]:
}
cookie = get_runtime_secret("POLYWEATHER_AMSC_COOKIE")
session_id = get_runtime_secret("POLYWEATHER_AMSC_SESSION_ID")
if cookie:
headers["Cookie"] = cookie
elif session_id:
if session_id:
headers["sessionId"] = session_id
headers["app"] = "AMS"
elif cookie:
headers["Cookie"] = cookie
return headers