简介
结果示例图:
模板:
{"_id":"doubanarticle","startUrl":["https://www.douban.com/people/wohaobeia/notes?start=[0-90:10]&type=note"],"selectors":
[{"id":"outer","type":"SelectorElement","parentSelectors":
["_root"],"selector":"div.note-container:nth-of-type(n+3)","multiple":true,"delay":"2000"},{"id":"title","type":"SelectorLink","parentSelectors":
["outer"],"selector":"h3 > a","multiple":false,"delay":0},{"id":"time","type":"SelectorText","parentSelectors":
["outer"],"selector":"span.pub-date","multiple":false,"regex":"","delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["outer"],"selector":"div.note","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的文章列表页面,例如:https://www.douban.com/people/wohaobeia/notes?start=90&type=note
(2)导入模板
(3)替换 Start URL为要抓取的网页链接(抓取多页需修改 Start URL 里的页码数)
(4)开始抓取