design tweaks

This commit is contained in:
2026-01-14 19:03:44 +01:00
parent ea9e24fcde
commit 75f1d1f18a
2 changed files with 30 additions and 11 deletions
+4 -1
View File
@@ -138,11 +138,13 @@ data:
for col in soup.select(".ik.daily-forecast-container .ik.dailyForecastCol")[:15]:
dow_el = col.select_one(".ik.dfDay")
icon_el = col.select_one("img.ik.forecast-icon")
daynum_el = col.select_one(".ik.dfDayNum")
# Normal structure (most days)
tmax_el = col.select_one("div.ik.max")
tmin_el = col.select_one("div.ik.min")
daynum = daynum_el.get_text(strip=True) if daynum_el else ""
dow = dow_el.get_text(strip=True) if dow_el else ""
icon = _abs_url(icon_el.get("src") if icon_el else None)
@@ -167,6 +169,7 @@ data:
if dow and (tmin is not None) and (tmax is not None):
daily.append(
{
"daynum": daynum,
"dow": dow, # e.g. "Cs", "P", "Sz"
"tmin_c": tmin,
"tmax_c": tmax,