Hi fellas.
I have to crawl ralali[dot]com every each category (https://www.ralali.com/all-categories).
Some category can be crawl with this sitemap (example):
{"_id":"ralali_Agriculture n Food","startUrl":["https://www.ralali.com/c/air-mineral-hl1189","https://www.ralali.com/c/alat-pertanian-hl1626","https://www.ralali.com/c/bahan--bumbu-makanan-hl1176","https://www.ralali.com/c/buah-buahan-segar-hl1594","https://www.ralali.com/c/cemilan--sarapan-hl1201","https://www.ralali.com/c/coklat-teh-kopi--susu-hl1173","https://www.ralali.com/c/madu--selai-hl1522","https://www.ralali.com/c/makanan-instant-hl1196","https://www.ralali.com/c/makanan-kaleng-hl1332","https://www.ralali.com/c/minuman-lainnya-hl1538","https://www.ralali.com/c/peralatan--perlengkapan-makan-hl1258","https://www.ralali.com/c/sayuran-segar-hl1591"],"selectors":[{"id":"scroll article","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"article","multiple":true,"delay":"3000"},{"id":"name","type":"SelectorText","parentSelectors":["scroll article"],"selector":"a div","multiple":true,"regex":"","delay":0},{"id":"harga","type":"SelectorText","parentSelectors":["scroll article"],"selector":"div.item-price","multiple":true,"regex":"","delay":0},{"id":"lokasi","type":"SelectorText","parentSelectors":["scroll article"],"selector":"div.item-location","multiple":true,"regex":"","delay":0},{"id":"nama toko atau supplier","type":"SelectorText","parentSelectors":["scroll article"],"selector":"a.ng-binding","multiple":true,"regex":"","delay":0},{"id":"link","type":"SelectorLink","parentSelectors":["scroll article"],"selector":".item-name a","multiple":true,"delay":0}]}
but this sitemap cannot be applied to all category, including this one : https://www.ralali.com/c/otomotif-hl0014
It will only crawl visible cards, not the entire card that loaded after scrolling.
I tired to modify the sitemap :
{"_id":"ralali_recrawl_otomotif","startUrl":["https://www.ralali.com/c/otomotif-hl0014"],"selectors":[{"id":"scrolldown","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.row.ng-scope:nth-of-type(n) item:nth-of-type(n) article","multiple":true,"delay":"4000"},{"id":"nama","type":"SelectorText","parentSelectors":["scrolldown"],"selector":"a div","multiple":true,"regex":"","delay":0},{"id":"harga","type":"SelectorText","parentSelectors":["scrolldown"],"selector":"div.price","multiple":true,"regex":"","delay":0},{"id":"lokasi","type":"SelectorText","parentSelectors":["scrolldown"],"selector":"div.item-location","multiple":true,"regex":"","delay":0},{"id":"nama toko atau supplier","type":"SelectorText","parentSelectors":["scrolldown"],"selector":"a.ng-binding","multiple":true,"regex":"","delay":0}]}
But still no luck. instead, Webscraper does not fetch any data.
So, what's wrong? Could anybody guide me through this problem? Any tips or trick to crawl card on infinite scroll?
Any comment will be appreciate.
Thanks.