喜欢数
结果示例图:
模板:
{"_id":"weibo-zonghe","startUrl":["https://s.weibo.com/weibo/%25E5%2586%2599%25E4%25BD%259C?topnav=1&wvr=6&b=1&page=[1-5]"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":["_root"],"selector":".m-con-l div.card","multiple":true,"delay":0},{"id":"content","type":"SelectorText","parentSelectors":["info"],"selector":"p.txt","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":["info"],"selector":"a.name","multiple":false,"regex":"","delay":0},{"id":"forward","type":"SelectorText","parentSelectors":
["info"],"selector":".card-act li:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":
["info"],"selector":".card-act li:nth-of-type(3)","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":
["info"],"selector":".card-act li:nth-of-type(4)","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的微博搜索结果页面,例如:https://s.weibo.com/weibo/%25E5%2586%2599%25E4%25BD%259C?topnav=1&wvr=6&b=1&page=1
(2)导入模板
(3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
(4)开始抓取