php是最好的语言

python3爬虫请求数据时 对请求参数进行gb2312编码

1,对其中一个参数进行编码

 .encode()
 urllib.parse.quote()

2,对整个参数进行编码

data_utf = urlencode(data, encoding='gb2312')


作者:xTao 分类:LNMP 浏览:2371 评论:0