更换 Telegram Bot 为新账号 polyyuanbot,更新群链接和推送配置

- Bot token/用户名全局替换:WeatherQuant_bot → polyyuanbot
- 群 ID 更新为新群 polyweather售后群(-1003927451869)
- 群邀请链接更新为 https://t.me/+Io5H9oVHFmVjOTQ5
- 修复机场推送:Paris/Taipei/Denver/Tel Aviv 支持 airport_primary/current 回退
- 修复跑道数据展示:has_runway 直接检测数据而非依赖 source 字段
- 创建新群 30 城 Forum Topics(data/city_thread_ids.json)
- 配置 AMSC AWOS 数据源 URL

Constraint: 旧 Telegram 账号已注销,Bot 完全重建
Tested: VPS 部署验证,所有城市推送正常,Topic 路由生效
This commit is contained in:
2569718930@qq.com
2026-05-24 16:03:29 +08:00
parent 89394e12ef
commit 5aa2a9e384
17 changed files with 54 additions and 30 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ TARGET_CITIES: List[str] = [
"qingdao",
]
FORUM_CHAT_ID = "-1003965137823"
FORUM_CHAT_ID = "-1003927451869"
CITY_NAME_ZH: Dict[str, str] = {
"beijing": "北京",
+17 -8
View File
@@ -25,7 +25,7 @@ _CITY_THREAD_IDS_PATH = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
"data", "city_thread_ids.json",
)
_FORUM_CHAT_ID = "-1003965137823"
_FORUM_CHAT_ID = "-1003927451869"
_city_thread_ids: dict = {}
@@ -917,12 +917,12 @@ def _build_airport_status_message(
time_suffix = f" · {local_time}" if local_time else ""
amos = city_weather.get("amos") or {}
runway_data = (amos.get("runway_obs") or {}) if amos else {}
runway_data = amos.get("runway_obs") or {}
runway_pairs = runway_data.get("runway_pairs") or []
runway_temps = runway_data.get("temperatures") or []
point_temps = runway_data.get("point_temperatures") or []
is_amsc = amos.get("source") in ("amsc_awos", "amos")
has_runway = bool(is_amsc and (point_temps or runway_temps))
has_runway = bool(runway_pairs and (runway_temps or point_temps))
amos_icao = amos.get("icao") or HIGH_FREQ_AIRPORT_ICAO.get(city, "")
settlement_pair = _settlement_runway_for_city(city)
@@ -1213,11 +1213,20 @@ def _process_airport_city(
airport_row = row
break
if not airport_row:
logger.warning(
"airport push skipped city={}: station {} not found in mgm_nearby ({} rows)",
city, airport_icao, len(mgm_nearby),
)
return None
airport_primary = city_weather.get("airport_primary") or {}
if airport_primary.get("temp") is not None:
airport_row = airport_primary
else:
current_fallback = city_weather.get("current") or {}
if current_fallback.get("temp") is not None:
airport_row = current_fallback
else:
logger.warning(
"airport push skipped city={}: station {} not found in mgm_nearby, "
"airport_primary, or current (mgm={} rows)",
city, airport_icao, len(mgm_nearby),
)
return None
station_temp = airport_row.get("temp") if airport_row else None
current_obs_time = str(airport_row.get("obs_time") or "")