I built a sitemap with a couple of levels (Category - Product - Product customizations), and it works fine when all levels exist. However, when there are no "product customizations" in the product, it doesn't generate even the product data.
I'd like to get the parent data with "null" (or blank) child when the child it doesn't exist.
Ex. (when product customization exist)
Category: A - Product: 1 - Product customization: 123
Expected result when Product customization does not exist
Category: A - Product: 1 - Product customization: "null" / blank
But instead, nothing is scraped in the above scenario
Any ideas?
Sitemap:
{"_id":"ifood-final-complementos-html","startUrl":["https://www.ifood.com.br/delivery/porto-alegre-rs/pizzaria-fragata-vila-ipiranga/796b3986-1ae1-4db7-bda3-98bab1d88fa9"],"selectors":[{"id":"card-categoria","parentSelectors":["_root"],"type":"SelectorElement","selector":"div.restaurant-menu-group","multiple":true,"delay":0},{"id":"card-produto","parentSelectors":["card-categoria"],"type":"SelectorElement","selector":"a","multiple":true,"delay":0},{"id":"categoria","parentSelectors":["card-categoria"],"type":"SelectorText","selector":"h2","multiple":false,"delay":0,"regex":""},{"id":"produto-link","parentSelectors":["card-produto"],"type":"SelectorLink","selector":"_parent_","multiple":false,"delay":0},{"id":"titulo","parentSelectors":["produto-link"],"type":"SelectorText","selector":".dish-modal__header div.nav-header__title","multiple":false,"delay":0,"regex":""},{"id":"descricao","parentSelectors":["produto-link"],"type":"SelectorText","selector":"p.dish-content__container","multiple":false,"delay":0,"regex":""},{"id":"info","parentSelectors":["produto-link"],"type":"SelectorText","selector":"div.dish-additional__side-space","multiple":false,"delay":0,"regex":""},{"id":"preco","parentSelectors":["produto-link"],"type":"SelectorText","selector":"div.dish-price","multiple":false,"delay":0,"regex":""},{"id":"url-imagem","parentSelectors":["produto-link"],"type":"SelectorImage","selector":"img.dish-content__img","multiple":false,"delay":0},{"id":"nome-restaurante","parentSelectors":["_root"],"type":"SelectorText","selector":"h1.merchant-info__title","multiple":false,"delay":0,"regex":""},{"id":"url-logo","parentSelectors":["_root"],"type":"SelectorImage","selector":"img.merchant-info__logo","multiple":false,"delay":0},{"id":"url-banner","parentSelectors":["_root"],"type":"SelectorHTML","selector":"header.merchant-banner","multiple":false,"regex":"","delay":0},{"id":"tempo-preparo","parentSelectors":["_root"],"type":"SelectorText","selector":"span.restaurant-scheduling-button__time","multiple":false,"delay":0,"regex":""},{"id":"taxa-entrega","parentSelectors":["_root"],"type":"SelectorText","selector":"span.restaurant-scheduling-button__price","multiple":false,"delay":0,"regex":""},{"id":"pedido-minimo","parentSelectors":["_root"],"type":"SelectorText","selector":"div.merchant-info__minimum-order","multiple":false,"delay":0,"regex":""},{"id":"ver-mais-link","parentSelectors":["_root"],"type":"SelectorElementClick","clickElementSelector":"button.merchant-details__button","clickElementUniquenessType":"uniqueHTML","clickType":"clickOnce","delay":8000,"discardInitialElements":"do-not-discard","multiple":false,"selector":"div.merchant-details-about__info"},{"id":"endereco","parentSelectors":["_root"],"type":"SelectorHTML","selector":"div.merchant-details-about__info","multiple":false,"regex":"","delay":0},{"id":"card-complementos","parentSelectors":["produto-link"],"type":"SelectorElement","selector":"section.garnish-choices__list","multiple":true,"delay":0},{"id":"titulo-grupo","parentSelectors":["card-complementos"],"type":"SelectorText","selector":"p.garnish-choices__title","multiple":false,"delay":0,"regex":""},{"id":"obrigatorio","parentSelectors":["card-complementos"],"type":"SelectorHTML","selector":"span.garnish-choices__tags","multiple":false,"regex":"","delay":0},{"id":"card-item","parentSelectors":["card-complementos"],"type":"SelectorElement","selector":"label.garnish-choices__label","multiple":true,"delay":0},{"id":"titulo-item","parentSelectors":["card-item"],"type":"SelectorText","selector":"p.garnish-choices__option-desc","multiple":false,"delay":0,"regex":""},{"id":"descricao-item","parentSelectors":["card-item"],"type":"SelectorText","selector":"span.garnish-choices__option-details","multiple":false,"delay":0,"regex":""},{"id":"preco-item","parentSelectors":["card-item"],"type":"SelectorText","selector":"span.garnish-choices__option-price","multiple":false,"delay":0,"regex":""}]}