作者名字
结果示例图:
模板:
{"_id":"zhidao-huida","startUrl":["https://zhidao.baidu.com/question/24259898.html?sort=11&rn=5&pn=[0-10:5]#wgt-answers"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.bd.answer","multiple":true,"delay":0},{"id":"content","type":"SelectorText","parentSelectors":
["info"],"selector":"div.mb-10","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":
["info"],"selector":".evaluate b","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":
["info"],"selector":".comment em","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":
["info"],"selector":"span.wgt-replyer-all-time","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":
["info"],"selector":"span.wgt-replyer-all-uname","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的问题回答页面,例如:https://zhidao.baidu.com/question/24259898.html?sort=11&rn=5&pn=0#wgt-answers
(2)导入模板
(3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
(4)开始抓取