热度
结果示例图:
模板:
{"_id":"zhihu-live","startUrl":["https://www.zhihu.com/search?q=%E7%8B%AC%E7%AB%8B%E5%BC%80%E5%8F%91%E8%80%85&type=live"],"selectors":[{"id":"outer","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div.KfeCollection-PcCollegeCard-root","multiple":true,"delay":"2000"},
{"id":"name","type":"SelectorLink","parentSelectors":["outer"],"selector":"a","multiple":false,"delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["outer"],"selector":"div.KfeCollection-PcCollegeCard-description","multiple":false,"regex":"","delay":0},{"id":"author","type":"SelectorText","parentSelectors":["outer"],"selector":"div.KfeCollection-PcCollegeCard-status","multiple":false,"regex":"","delay":0}]}
模板套用步骤:
(1)进入知乎搜索live结果页面,例如:https://www.zhihu.com/search?q=%E7%8B%AC%E7%AB%8B%E5%BC%80%E5%8F%91%E8%80%85&type=live
(2)导入模板
(3)替换 Start URL为要抓取的网页链接
(4)开始抓取