好人做到底,发个debug log,给用 google 来看问题解决的指个路吧:
logging.getLogger().setLevel(logging.DEBUG)
logging.debug('')
DEBUG:chardet.charsetprober:SHIFT_JIS Japanese prober hit error at byte 57
DEBUG:chardet.charsetprober:EUC-JP Japanese prober hit error at byte 58
DEBUG:chardet.charsetprober:GB2312 Chinese prober hit error at byte 58
DEBUG:chardet.charsetprober:EUC-KR Korean prober hit error at byte 58
DEBUG:chardet.charsetprober:CP949 Korean prober hit error at byte 58
DEBUG:chardet.charsetprober:Big5 Chinese prober hit error at byte 58
DEBUG:chardet.charsetprober:EUC-TW Taiwan prober hit error at byte 58
DEBUG:chardet.charsetprober:windows-1251 Russian confidence = 0.0
DEBUG:chardet.charsetprober:KOI8-R Russian confidence = 0.0
DEBUG:chardet.charsetprober:ISO-8859-5 Russian confidence = 0.0
DEBUG:chardet.charsetprober:MacCyrillic Russian confidence = 0.0
DEBUG:chardet.charsetprober:IBM866 Russian confidence = 0.026649600016819586
DEBUG:chardet.charsetprober:IBM855 Russian confidence = 0.019240425506648864
DEBUG:chardet.charsetprober:ISO-8859-7 Greek confidence = 0.24314019951680782
DEBUG:chardet.charsetprober:windows-1253 Greek confidence = 0.26414521083601133
DEBUG:chardet.charsetprober:ISO-8859-5 Bulgairan confidence = 0.0
DEBUG:chardet.charsetprober:windows-1251 Bulgarian confidence = 0.0
DEBUG:chardet.charsetprober:TIS-620 Thai confidence = 0.01920667280463305
DEBUG:chardet.charsetprober:ISO-8859-9 Turkish confidence = 0.47344105836429967
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0
DEBUG:chardet.charsetprober:windows-1251 Russian confidence = 0.0
DEBUG:chardet.charsetprober:KOI8-R Russian confidence = 0.0
DEBUG:chardet.charsetprober:ISO-8859-5 Russian confidence = 0.0
DEBUG:chardet.charsetprober:MacCyrillic Russian confidence = 0.0
DEBUG:chardet.charsetprober:IBM866 Russian confidence = 0.026649600016819586
DEBUG:chardet.charsetprober:IBM855 Russian confidence = 0.019240425506648864
DEBUG:chardet.charsetprober:ISO-8859-7 Greek confidence = 0.24314019951680782
DEBUG:chardet.charsetprober:windows-1253 Greek confidence = 0.26414521083601133
DEBUG:chardet.charsetprober:ISO-8859-5 Bulgairan confidence = 0.0
DEBUG:chardet.charsetprober:windows-1251 Bulgarian confidence = 0.0
DEBUG:chardet.charsetprober:TIS-620 Thai confidence = 0.01920667280463305
DEBUG:chardet.charsetprober:ISO-8859-9 Turkish confidence = 0.47344105836429967
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0
DEBUG:chardet.charsetprober:windows-1255 Hebrew confidence = 0.0