<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
则写代码时注意转码
html=html.decode("gbk","ignore").encode('utf-8')
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
则写代码时注意转码
html=html.decode("gbk","ignore").encode('utf-8')
import sys
reload(sys)
sys.setdefaultencoding('utf-8')