这是我的PYTHON代码,检测status_code返回值是200但是就是不打印。请问原因在哪,以下两张图是网上爬取的截图 爬取网址是https://www.iciba.com/translate
import requests
class iciba(object):
def __init__(self,word):
self.url='ifanyi.iciba.com/index.php?c=trans&m=fy&client=6&auth_user=key_web_fanyi&sign=994b65f5e8e547cc'
self.headers={"Uesr-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"}
self.data={'from':"en",'to':'zh','q':word}
def get_data(self):
response=requests.post(url=self.url,headers=self.headers,data=self.data)
return response.content
def run(self):
response=self.get_data()
print(response)
if __name__=='__mian__':
iciba=iciba("apple")
iciba.run()