wb_data = requests.get('http://www.ip138.com') wb_data.encoding = 'gbk' #加入此行 即可解决 print(wb_data.text)