点赞数
结果示例图:
模板:
{"_id":"weibo-zuozhe","startUrl":["https://www.weibo.com/zhangyiming?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=[1-5]#feedtop"],"selectors":[{"id":"info","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.WB_feed_type:nth-of-type(n+2)","multiple":true,"delay":"3000"},{"id":"content","type":"SelectorText","parentSelectors":["info"],"selector":"div.W_f14","multiple":false,"regex":"","delay":0},{"id":"forward","type":"SelectorText","parentSelectors":["info"],"selector":"div.WB_expand","multiple":false,"regex":"","delay":0},
{"id":"forward-num","type":"SelectorText","parentSelectors":
["info"],"selector":"[node-type='forward_btn_text'] em:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"comments","type":"SelectorText","parentSelectors":
["info"],"selector":"[node-type='comment_btn_text'] em:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"likes","type":"SelectorText","parentSelectors":
["info"],"selector":".pos .line [node-type] em:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"time","type":"SelectorText","parentSelectors":["info"],"selector":"a[name]","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入需要抓取的大v微博主页,例如:https://weibo.com/alibuybuy?is_search=0&visible=0&is_all=1&is_tag=0&profile_ftype=1&page=1#feedtop
(2)导入模板
(3)替换 Start URL为要抓取的网页链接,(抓取多页需修改 Start URL 里的页码数)
(4)开始抓取