在使用Python请求的提示中单击OK按钮

2024-04-25 23:32:33 发布

您现在位置:Python中文网/ 问答频道 /正文

所以基本上,我想用Python的Requests模块来实现自动化

登录网站>;超时>;注销

我已经使用“.post()”代码完成了网站自动登录。 但是当我尝试使用googlechrome的inspect检查表单时,我被困在了超时按钮上,因为它没有显示任何表单数据。我使用了相同的“.post()”代码。它实际上不起作用。我注意到有一个提示符窗口有“确定”和“取消”按钮,您需要单击“确定”才能继续,这也是我单击“检查”菜单时唯一记录的网络活动。以下是Chrome的Inspect中的结果,如果可以的话。你知道吗

GENERAL
    Request URL: https://blah.blah.com/auth/WebLogSubmit.igx?type=OUT
    Request Method: POST
    Status Code: 200 OK
    Remote Address: 1.11.11.1
    Referrer Policy: no-referrer-when-downgrade
RESPONSE HEADERS
    Cache-Control: no-cache, no-store, must-revalidate
    Connection: keep-alive
    Content-Encoding: gzip
    Content-Length: 320
    Content-Type: text/html;charset=utf-8
    Date: Tue, 26 Feb 2019 23:38:49 GMT
    Pragma: no-cache
    Server: Jetty(9.4.14.v20181114)
    Strict-Transport-Security: max-age=0
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1; mode=block
REQUEST HEADERS
    Accept: */*
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.9
    Connection: keep-alive
    Content-Length: 0
    Cookie: _lastloggeddate=off; _lastloggeddate=on; JSESSIONID=0HVVf1JLkZLWllMLbSLoG2o14ZXLHiFB4yq2am+VAHBAsKGAt0Avkgacwe9qly7UBF3Ga2As/R0+ChgF7GEQJA==; AWSELB=E204C7B7ED3B76034B4DCF9D0AA226E459847982290B43FAF19399EF5AC1BC948D033EAAF9221BD4FB9718F6; _ga=GA1.2.1551220185; _gid=GA1.2.1551220185
    Host: blah.blah.com
    Origin: https://blah.blah.com
    Referer: https://blah.blah.com/auth/index.htm
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
    X-Requested-With: XMLHttpRequest
QUERY STRING PARAMETERS
    type: OUT

    WebLogSubmit.igx?type=OUT

Tags: no代码httpsgtcom表单网站type