2020
10-09
10-09
Python如何爬取b站热门视频并导入Excel
代码如下#encoding:utf-8importrequestsfromlxmlimportetreeimportxlwtimportos#爬取b站热门视频信息defspider():video_list=[]url="https://www.bilibili.com/ranking?spm_id_from=333.851.b_7072696d61727950616765546162.3"html=requests.get(url,headers={"User-Agent":"Mozilla/5.0(WindowsNT10.0;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/75.0.3770.100Safari/537.36"}).text...
继续阅读 >