diff --git a/app/scraper.py b/app/scraper.py index a2a8547..4aa506f 100644 --- a/app/scraper.py +++ b/app/scraper.py @@ -354,11 +354,14 @@ def _parse_nosalty(soup: BeautifulSoup, url: str) -> dict: instructions.append(txt) # --- Tags --- + # Scoped to div.p-recipe__attributeList to avoid site-wide SEO tags. tags = [] - for a in soup.find_all("a", class_="m-tags__tagItem"): - tag_text = a.get_text(strip=True) - if tag_text: - tags.append(tag_text) + attr_list = soup.find("div", class_="p-recipe__attributeList") + if attr_list: + for a in attr_list.find_all("a", class_="m-tags__tagItem"): + tag_text = a.get_text(strip=True) + if tag_text: + tags.append(tag_text) return { "title": title or "Ismeretlen recept",