简介
结果示例图:
模板:
{"_id":"douban-dianying","startUrl":["https://www.douban.com/search?cat=1001&q=%E5%86%99%E4%BD%9C"],"selectors":[{"id":"aaa","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"div.result","multiple":true,"delay":"3000","clickElementSelector":"a.j","clickType":"clickMore","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueCSSSelector"},{"id":"name","type":"SelectorLink","parentSelectors":
["aaa"],"selector":"h3 a","multiple":false,"delay":0},{"id":"score","type":"SelectorText","parentSelectors":["aaa"],"selector":"span.rating_nums","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":
["aaa"],"selector":"span:nth-of-type(3)","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":
["aaa"],"selector":"span.subject-cast","multiple":false,"regex":"","delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["aaa"],"selector":"p","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的电影搜索结果页面,例如:https://www.douban.com/search?cat=1002&q=%E5%86%99%E4%BD%9C
(2)导入模板
(3)替换 Start URL为要抓取的网页链接
(4)开始抓取