看了下你的问题,中文可参考下面代码
import requests
headers_input={
"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
}
k=str("运维".encode('unicode-escape'))
k=k.replace("\\\\","%")
print(k)
u="
http://hr.bjx.com.cn/SearchResult.aspx?keyword={}&function1=&function2=&class1=&class2=&record=0&workTime=0&workprovince=&chkabove=".format(k)
params = {'keyWord': k.upper(), 'function2': '', 'function1': '','class1': '', 'class2': '', 'workprovince': '', 'record': 0, 'workTime': 0,'chkabove': '', 'page': 1}
r=requests.get(u,headers=headers_input,timeout=5) #params=params 时会出错
r.encoding = r.apparent_encoding #从内容分析出的响应内容编码方式
resp_text=r.text
print(r.text)