1.爬取网站数据
2.将爬取的数据存入excel表中
3.用excel进行数据可视化操作
代码如下:
from bs4 import BeautifulSoup
from urllib import request
import xlwt
# 获取数据
value = 1
while value <= 2:
value0 = str(value)
url = "http://www.hs-bianma.com/hs_chapter_" + value0 + ".htm"
# url="http://www.hs-bianma.com/hs_chapter_01.htm"
'''此行可以自行更换代码用来汇集数据'''
response = request.urlopen(url)
html = response.read

本文通过Python爬虫技术抓取网站数据,并详细讲解如何将这些数据存储到Excel表格中,进一步实现数据的Excel可视化操作。
最低0.47元/天 解锁文章
1018

被折叠的 条评论
为什么被折叠?



