web scraper——爬取知乎|微博用戶數據模板【三】


前言

在這里呢,我就只給模板,不寫具體的教程啦,具體的可以參考我之前寫的博文。
https://www.cnblogs.com/wangyang0210/p/10338574.html

模板

  1. 進入微博選擇粉絲較多的博主

  2. 復制下面的模板導入站點即可

  3. 修改地址,編輯好名稱,點擊Import Sitemap即可

微博

{"_id":"weibo_chenglong","startUrl":["https://weibo.com/p/1006051234552257/follow?relate=fans&page=[1-5]"],"selectors":[{"id":"userinfo","type":"SelectorElement","parentSelectors":["_root"],"selector":"li.follow_item","multiple":true,"delay":6},{"id":"username","type":"SelectorText","parentSelectors":["userinfo"],"selector":"a.S_txt1","multiple":false,"regex":"","delay":0},{"id":"avatar","type":"SelectorImage","parentSelectors":["userinfo"],"selector":"img","multiple":false,"delay":0},{"id":"city","type":"SelectorText","parentSelectors":["userinfo"],"selector":"div.info_add span","multiple":false,"regex":"","delay":0}]}

知乎

{"_id":"zhihuranqiqigongzuoshi","startUrl":["https://www.zhihu.com/people/xie-ling-520/followers?page=[1-45]"],"selectors":[{"id":"list","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.List-item","multiple":true,"delay":0},{"id":"username","type":"SelectorText","parentSelectors":["list"],"selector":"div.UserItem-title","multiple":false,"regex":"","delay":0},{"id":"avatar","type":"SelectorImage","parentSelectors":["list"],"selector":"img","multiple":false,"delay":0}]}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM