关注者数
结果示例图:
模板:
{"_id":"zhihufollowing","startUrl":
["https://www.zhihu.com/people/wangdegnke/following?page=[1-5]"],"selectors":
[{"id":"following","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.List-item","multiple":true,"delay":"2000"},
{"id":"user-name","type":"SelectorText","parentSelectors":
["following"],"selector":"div.UserItem-title","multiple":false,"regex":"","delay":0},{"id":"answers","type":"SelectorText","parentSelectors":["following"],"selector":"span.ContentItem-statusItem:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"articles","type":"SelectorText","parentSelectors":["following"],"selector":"span.ContentItem-statusItem:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"followers","type":"SelectorText","parentSelectors":["following"],"selector":"span.ContentItem-statusItem:nth-of-type(3)","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的大v关注人页面,例如:https://www.zhihu.com/people/wangdegnke/following
(2)导入模板
(3)替换 Start URL为要抓取的网页链接,修改要抓取的页数,比如:”[1-5]“是 第 1 页到第 5 页所有关注者。
(4)开始抓取