Scraping all items on gamelife.it

Hey guys,
Newbie here.
So I am trying to crawl all the links in this site's section one by one - getting the data from the Product details of the first one, then going to the second, until the last one, no matter how many they are. But the crawl stops right after extracting the first entry data. I am definitely doing something wrong, but I have no idea what it is. Could you please take a look at the code and tell me what am I missing?

Url: Novità in prenotazione|Gamelife

Sitemap:

{"_id":"gamelife","startUrl":["https://www.gamelife.it/prenota-ora.html?is_in_stock=0&p=all"],"selectors":[{"id":"Grid selection","parentSelectors":["_root"],"type":"SelectorElementClick","clickElementSelector":"a.product-item-link","clickElementUniquenessType":"uniqueHTMLText","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","multiple":true,"selector":"a.product-item-link"},{"id":"Title","parentSelectors":["_root"],"type":"SelectorText","selector":"h1","multiple":false,"delay":0,"regex":""},{"id":"Linea di prodotto","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main .attribute-code-gl_platform span.attribute-value","multiple":false,"delay":0,"regex":""},{"id":"Marca","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main span[itemprop='name']","multiple":false,"delay":0,"regex":""},{"id":"EAN","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main .attribute-code-gl_ean span.attribute-value","multiple":false,"delay":0,"regex":""},{"id":"Genere","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main .attribute-code-gl_genre span.attribute-value","multiple":false,"delay":0,"regex":""},{"id":"PEGI","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main .attribute-code-gl_pegi span.attribute-value","multiple":false,"delay":0,"regex":""},{"id":"Release","parentSelectors":["_root"],"type":"SelectorText","selector":".product-info-main .attribute-code-gl_day_one span.attribute-value","multiple":false,"delay":0,"regex":""}]}

@roshoivanov Hi, could you, please, re-paste your sitemap(by applying the 'Preformatted text' option) as the JSON of it seem to be invalid?


Sure, the post is now edited with the preformatted text :wink:

@roshoivanov 'Element click' selector will not keep functioning if the page is reloaded, therefore you can use the 'Link' selector instead.

Example:

{"_id":"gamelife","startUrl":["https://www.gamelife.it/prenota-ora.html?is_in_stock=0&p=all"],"selectors":[{"delay":0,"id":"product-page","multiple":true,"parentSelectors":["product-link"],"selector":"body:has(span[itemprop=\"name\"])","type":"SelectorElement"},{"delay":0,"id":"Title","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":"h1","type":"SelectorText"},{"delay":0,"id":"Linea di prodotto","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main .attribute-code-gl_platform span.attribute-value","type":"SelectorText"},{"delay":0,"id":"Marca","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main span[itemprop='name']","type":"SelectorText"},{"delay":0,"id":"EAN","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main .attribute-code-gl_ean span.attribute-value","type":"SelectorText"},{"delay":0,"id":"Genere","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main .attribute-code-gl_genre span.attribute-value","type":"SelectorText"},{"delay":0,"id":"PEGI","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main .attribute-code-gl_pegi span.attribute-value","type":"SelectorText"},{"delay":0,"id":"Release","multiple":false,"parentSelectors":["product-page"],"regex":"","selector":".product-info-main .attribute-code-gl_day_one span.attribute-value","type":"SelectorText"},{"delay":0,"id":"product-link","multiple":true,"parentSelectors":["_root"],"selector":"a.product-item-link","type":"SelectorLink"}]}

1 Like

Works as a charm! Thanks!