🐛 fixed MAMAFOOD
All checks were successful
Update menicka / update-rss (push) Successful in 5m13s

redundant h4 broke parsing
This commit is contained in:
2024-11-27 10:33:57 +01:00
parent 0e5bdc3138
commit 7b97a170d9
3 changed files with 21 additions and 3 deletions

View File

@ -96,8 +96,9 @@ async function menickoMamafoodbistro(){
const dny= {};
for(const den of menicko.getElementsByTagName("h4")){
const polevka= den.nextElementSibling;
if(!polevka) break;
let hi= polevka;
const hlavni= [ hi ];
const hlavni= [];
while(( hi= hi.nextElementSibling ) && hi.tagName !== "H4")
hlavni.push(hi);
Reflect.set(dny, den.textContent.trim().toLowerCase(), {
@ -105,7 +106,6 @@ async function menickoMamafoodbistro(){
hlavni: hlavni.map(el=> el.textContent),
});
}
echo(dny);
return { name: "MAMAFOOD", symbol: "🍎", url, dny };
}