找不到Python请求页面

时间:2019-02-19 11:40:30

标签: python python-requests

常规

  

请求网址:http://172.28.0.254/esi/912100/esi.cgi?page=globalsettings-index.xml&userIdent=1530588493&menu=%22DNS%22&replace=inline&SharedTmpSid=08153828&cacheAvoider=1550572875602

     

请求方法:GET

     

状态码:200 OK

     

远程地址:172.28.0.254:80

     

推荐人政策:降级时不推荐人

请求标头:

Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: keep-alive
Host: 172.28.0.254
Referer: http://172.28.0.254/esi/912100/esi.cgi?page=index.xml&sessionID=1530588493
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36
X-Requested-With: XMLHttpRequest

查询字符串:

page: globalsettings-index.xml
userIdent: 1530588493
menu: "DNS"
replace: inline
SharedTmpSid: 08153828
cacheAvoider: 1550572875602

upon是chrome的痕迹 下面是显示跟踪的图片: the trace

我编写了一个脚本来获取页面以获取反馈内容,响应代码为200,但请求反馈文本为<H1>globalsettings-index.xml Not Found</H1>

下面是我的脚本:

def revise_Dns(id,shareid):
    url1="http://172.28.0.254/esi/912100/esi.cgi"
    payload={
        "page": "globalsettings-index.xml",
        "userIdent": id,
        "menu": "DNS",`enter code here`
        "replace": "inline",
        "SharedTmpSid": shareid,
        "cacheAvoider": str(int(round(time.time() * 1000)))
    }
    g=r.get(url1,params=payload,headers=header)
    print g.status_code
    print g.text
revise_Dns(id,shareid)

寻找谁可以帮助我解决这个问题,谢谢!

0 个答案:

没有答案