I'm using python and requests module==2.18.4
While crawling some data with requests, I used the logging module for debugging.
I want the log to look something like this:
[DEBUG] 2018-01-25 03:15:36,940 http://localhost:8888 "GET /aaa" 200 2290
[DEBUG] 2018-01-25 03:15:36,940 http://localhost:8888 "GET /aaa" 200 2290
[DEBUG] 2018-01-25 03:15:36,940 http://localhost:8888 "GET /aaa" 200 2290
But I get this:
[DEBUG] 2018-01-25 03:15:36,940 http://localhost:8888 "GET /aaa" 200 2290
[DEBUG] 2018-01-25 03:15:36,974 EUC-JP Japanese prober hit error at byte 1765
[DEBUG] 2018-01-25 03:15:36,990 EUC-KR Korean prober hit error at byte 1765
[DEBUG] 2018-01-25 03:15:36,994 CP949 Korean prober hit error at byte 1765
[DEBUG] 2018-01-25 03:15:37,009 EUC-TW Taiwan prober hit error at byte 1765
[DEBUG] 2018-01-25 03:15:37,036 utf-8 not active
[DEBUG] 2018-01-25 03:15:37,036 SHIFT_JIS Japanese confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,036 EUC-JP not active
[DEBUG] 2018-01-25 03:15:37,036 GB2312 Chinese confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,036 EUC-KR not active
[DEBUG] 2018-01-25 03:15:37,036 CP949 not active
[DEBUG] 2018-01-25 03:15:37,036 Big5 Chinese confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,036 EUC-TW not active
[DEBUG] 2018-01-25 03:15:37,036 windows-1251 Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 KOI8-R Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 ISO-8859-5 Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 MacCyrillic Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 IBM866 Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 IBM855 Russian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 ISO-8859-7 Greek confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 windows-1253 Greek confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 ISO-8859-5 Bulgairan confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 windows-1251 Bulgarian confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 TIS-620 Thai confidence = 0.01
[DEBUG] 2018-01-25 03:15:37,038 ISO-8859-9 Turkish confidence = 0.47949350706
[DEBUG] 2018-01-25 03:15:37,038 windows-1255 Hebrew confidence = 0.0
[DEBUG] 2018-01-25 03:15:37,038 windows-1255 Hebrew confidence = 0.0
[DEBUG] 2018-01-25 03:15:37,038 windows-1255 Hebrew confidence = 0.0
...
I don't want that encoding in logs. How can I remove them?