import requests url1 = "http://overseas-appapi-test.5i5j.com/site/index" data1 = {"language": "en-us"} res = requests.get(url1,data1) print(res.url) print(res.status_code) print(res.text)
解决办法:
(automationVenv) [root@67 automationtest]# nano /etc/hosts
测试结果:
可以正常访问了
参考
问题分析与定位:
:https://bbs.csdn.net/topics/392505040
centos7配置hosts并使其生效