修复 CMA 温度提取:_extract_first 添加 re.DOTALL 标志支持多行 HTML 内容
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user