Trying to scrape shopee website

Want to scrape the listing below the banners.
I can get all 50 titles of the listing in the data preview
but when i press scrape, most of the data appears as null

what did i do wrongly ?
please assist

Thank you

Url: https://shopee.sg/Toys-Kids-Babies-cat.12

The Shopee site uses lazy loading, so it needs a scroller to load the bottom-of-page items. If you don't scroll down, you will get null results.

1 Like

Thank you Lee Meng
It works

Hmm to add on,
does anyone know how to extract images if the html is displayed like this

<div class="_1T9dHf _3XaILN" style="background-image: url(&quot;https://cf.shopee.sg/file/6ebce3ce91591590a1179fc5598c18cb_tn&quot;); background-size: contain; background-repeat: no-repeat;"></div>

The image is in the css background-image

Thank you

hmm I am not sure, maybe use regex to get it out? @iconoclast, I see you're back.. any thoughts here?

Normally you could just use Element attribute for this. but there's a need to extract a url so you can use Element: HTML and a regex (Element attribute does not support regex yet):

Selector: div[style^="background-image"]

Regex: (?<=&quot;).+(?=&quot;)

Assuming the url between the two &quot; is what you wanted.

2 Likes

I will try this now , but showing "null" ):

This my demo sitemap

{"_id":"shopeekidcart","startUrl":["https://shopee.co.th/เสื้อผ้าแฟชั่นผู้ชาย-cat.48"],"selectors":[{"id":"Product Selector","type":"SelectorLink","parentSelectors":["_root"],"selector":".col-xs-2-4 a","multiple":true,"delay":0},{"id":"name","type":"SelectorText","parentSelectors":["Product Selector"],"selector":".qaNIZv span","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["Product Selector"],"selector":"div._3n5NQx","multiple":false,"regex":"","delay":0},{"id":"Img","type":"SelectorHTML","parentSelectors":["Product Selector"],"selector":"div[style^="background-image"]","multiple":false,"regex":"(").+(")","delay":0},{"id":"scrolldown","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"svg.icon-arrow-left","multiple":false,"delay":0},{"id":"imgtest","type":"SelectorHTML","parentSelectors":["Product Selector"],"selector":"div._1RzplO","multiple":false,"regex":"(").+(")","delay":0},{"id":"imgtest2","type":"SelectorHTML","parentSelectors":["Product Selector"],"selector":"div._2JMB9h","multiple":false,"regex":"","delay":0}]}