教育
结果示例图:
模板:
{"_id":"weibo-user","startUrl":["https://s.weibo.com/user?q=%E5%86%99%E4%BD%9C&Refer=weibo_user&page=[1-5]"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":
["_root"],"selector":".m-con-l div.card","multiple":true,"delay":0},{"id":"name","type":"SelectorLink","parentSelectors":["info"],"selector":"a.name","multiple":false,"delay":0},{"id":"address","type":"SelectorText","parentSelectors":
["info"],"selector":"p:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"following","type":"SelectorText","parentSelectors":
["info"],"selector":"span:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"followers","type":"SelectorText","parentSelectors":
["info"],"selector":"span:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"contents","type":"SelectorText","parentSelectors":
["info"],"selector":"span.s-nobr","multiple":false,"regex":"","delay":0},{"id":"intro","type":"SelectorText","parentSelectors":
["info"],"selector":"p:nth-of-type(4)","multiple":false,"regex":"","delay":0},{"id":"tag","type":"SelectorText","parentSelectors":
["info"],"selector":"p:nth-of-type(5)","multiple":false,"regex":"","delay":0},{"id":"edu","type":"SelectorText","parentSelectors":
["info"],"selector":"p:nth-of-type(6)","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的用户搜索结果页面,例如:https://s.weibo.com/user?q=%E5%86%99%E4%BD%9C&Refer=weibo_user&page=1
(2)导入模板
(3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
(4)开始抓取