Python2.7编写的读取html中指定元素,并生成excle文件 复制代码 代码如下:#coding=gbkimport stringimport codecsimport os,timeimport xlwtimport xlrdfrom bs4 import BeautifulSoup from xlrd import open_workbook class LogMsg: def __init__(self,logfile,Level=0): try: import logging