修复 CMA 温度提取:_extract_first 添加 re.DOTALL 标志支持多行 HTML 内容

This commit is contained in:
2569718930@qq.com
2026-05-23 10:18:36 +08:00
parent c18ff504e4
commit 0a7aaf19a6
+1 -1
View File
@@ -151,7 +151,7 @@ def _fetch_cma_forecast(city_key: str) -> Optional[Dict[str, Any]]:
def _extract_first(html: str, pattern: str) -> Optional[str]:
m = re.search(pattern, html, re.IGNORECASE)
m = re.search(pattern, html, re.IGNORECASE | re.DOTALL)
return m.group(1) if m else None