摘要:
from openpyxl import Workbook #创建一个excel wb = Workbook() #激活这个excel ws = wb.active #创建一个sheet ws= wb.create_sheet('测试') #保存excel wb.save('D:\doc\文件.xl 阅读全文
摘要:
result = requests.get(url=url)soup = BeautifulSoup(result.content,features="lxml") links = soup.select('.atc_title') 阅读全文
摘要:
import docxfrom docx.oxml.ns import qn #导入样式注意:安装docx,需要安装python-docx,而不是docx,否则docx.oxml.ns无法导入成功 创建word文档:doc = docx.Document()添加标题doc.add_heading(' 阅读全文