赞同数
结果示例图:
模板:
{"_id":"zhihureply","startUrl":
["https://www.zhihu.com/question/60031957"],"selectors":[{"id":"outer","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.List-item","multiple":true,"delay":"2000"},{"id":"zan","type":"SelectorText","parentSelectors":["outer"],"selector":"button.VoteButton--up","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":["outer"],"selector":"button.ContentItem-action:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"content","type":"SelectorText","parentSelectors":["outer"],"selector":"div.RichContent","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的问题网页,例如:https://www.zhihu.com/question/54953286
(2)导入模板
(3)替换 Start URL为要抓取的网页链接
(4)开始抓取