redundant h4 broke parsing
This commit is contained in:
4
cli.mjs
4
cli.mjs
@ -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 };
|
||||
}
|
||||
|
Reference in New Issue
Block a user