因此,我正在尝试从一个网站happyfresh中提取SKU。
他们在类别页面中有4个子类别,我面临的问题是我不知道如何设置选择器,以便网络爬虫会进入整个子类别并在每个子类别中找到所有SKU子类别?
这是我使用的站点地图:
{"_id":"ltg_freshproduce","startUrl":["https://www.happyfresh.id/stores/lotte-mart/locations/105/category/2"],"selectors":[{"id":"sub_category","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.products-wrapper","multiple":true,"delay":"500","clickElementSelector":"a.more-product-button","clickType":"clickMore","discardInitialElements":true,"clickElementUniquenessType":"uniqueText"},{"id":"name","type":"SelectorText","parentSelectors":["sub_category"],"selector":"div.products-category:nth-of-type(1) a:nth-of-type(1) h5.product-name","multiple":true,"regex":"","delay":0}]}
正在包装所有子类别,但是结果仅提取第一个子类别?
有人可以帮忙吗?