一、问题描述
- Form Data表单里面出现参数值为:unable to decode value ,导致python爬虫时返回页面源代码丢失内容
- 网站源码编码为GBK
二、解决方法
- 提交的form表单参数值编码转换 :“orgName”: “北京”.encode(“GBK”),
'page_flag': 'true',
'pagesize_key': 'baXyBasicInfoXxgsList',
'page_size': '10',
"page_order": "",
"goto_page": "",
"current_page": "1",
"total_count": "14913",
"legalName": "",
"xingYongDaiMa": "",
"corporateType": "",
"registrationNo": "",
"orgName": "北京".encode("GBK"),
"ps": "10",
"to_page": "1",
来源:CSDN
作者:Shrimay1
链接:https://blog.csdn.net/weixin_43411585/article/details/103821273