2018年11月19日14:02:33
寫爬蟲時(shí)報(bào)錯(cuò)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2764' in position 133: illegal multibyte sequence
Windows打開文件是以GBK方式打開的,對(duì)UTF-8字符不識(shí)別,修改文件打開方式后正常
txts =open('./contents','a',encoding='utf-8')