fix(mindmegette): use meal name h2 as title for alt-format pages

Alt-format pages (e.g. /alapetelek/) have the meal name in an h2
element above the Hozzávalók header, which is more useful than the
long article title from og:title.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 20:36:31 +01:00
parent 6f12cc06a4
commit 76846eb427
+6
View File
@@ -141,6 +141,12 @@ def _parse_mindmegette(soup: BeautifulSoup, url: str) -> dict:
hozz_h3 = h3
break
if hozz_h3:
# Use h2 just before "Hozzávalók" as the meal name (e.g. "Salsa Roja")
prev_h2 = hozz_h3.find_previous_sibling("h2")
if prev_h2:
meal_name = prev_h2.get_text(strip=True)
if meal_name:
title = meal_name
ul = hozz_h3.find_next_sibling("ul")
if ul:
for li in ul.find_all("li"):