时间:2024-3-31|作者: sunliguo|评论:No Responses|点击:|
乱码原因:
运行时终端默认使用GBK编码,导致需要使用无法读取utf-8的字符集
2个解决方案:
– 修改源码(不推荐)
-增加如下代码:
import subprocess
from functools import partial #用来固定某个参数的固定值
subprocess.Popen=partial(subprocess.Popen,encoding=’utf-8′)
注意:上面的代码必须在导入execjs前。
随机文章:
This entry was posted
on Sunday, March 31st, 2024 at 08:03 and is filed under 爬虫.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.