如下所示:
1.pip install requests
2.pip install lxml
3.pip install xlsxwriter
import requests #想要爬必须引
from lxml import html #这个是用于页面爬取
import xlsxwriter#操作Excel表格库
workbook = xlsxwriter.Workbook('E:/test/test.xlsx')# 新建的Excel表格文档路径
worksheet = workbook.add_worksheet() # 建立sheet, 可以work.add_worksheet('em
1