繁体   English   中英

python-使用splinter打开登录网页失败,求救!!

[英]python- using splinter to open and login webpage failed, help!!

https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=990d5c9e38720f4e832a8009a0fe4cad7dd151f99111dbea0df5e2934f267ec8&language=HK-en&segment=R409&grpcode=g001&view=6&rv=1&paramcode=h006&path=%2Fgeniusbar%2FR409%2Fen_HK&path2=%2Fgeniusbar%2FR409%2Fen_HK

我想自动登录这个网站,但不管 browser.fill 或find_by_namefind_by_id不起作用

以下是输入的信息:

<input type="email" class="si-text-field" id="appleId" can-field="accountName" autocomplete="off" autocorrect="off" autocapitalize="off" aria-required="true" required="required" aria-labelledby="appleIdFieldLabel" spellcheck="false" autofocus="" placeholder="Apple ID">
<input type="password" id="pwd" aria-required="true" required="required" can-field="password" autocomplete="off" class="si-password si-text-field  " placeholder="Password"> 

但是当我使用下面的代码时,它不起作用,我不知道登录表单有什么特殊之处,

 browser.fill("appleId","***")
    browser.fill("pwd","***")

splinter.exceptions.ElementDoesNotExist: no elements could be found with name "appleId"

表单在iframe ,在填写登录名和密码之前切换到它:

with browser.get_iframe('aid-auth-widget-iFrame') as iframe:
    browser.find_by_id("appleId").type("your login") 
    browser.find_by_id("pwd").type("your password")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM