将商业核心数据源 URL 从源码迁移到环境变量,VPS .env 已补全

This commit is contained in:
2569718930@qq.com
2026-05-19 15:42:03 +08:00
parent 7e0d955d22
commit 3b8098051e
11 changed files with 57 additions and 33 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ No API key required.
from __future__ import annotations
import csv
import os
import io
import time
from datetime import datetime
@@ -17,7 +18,7 @@ from loguru import logger
from src.utils.metrics import record_source_call
HKO_BASE_URL = "https://data.weather.gov.hk/weatherAPI/hko_data/regional-weather"
HKO_BASE_URL = os.getenv("HKO_BASE_URL", "").strip() or "https://data.weather.gov.hk/weatherAPI/hko_data/regional-weather"
HKO_STATIONS = {
"hong kong": {
"code": "HK Observatory",