我正在尝试在此网站上填写我的用户名和密码:https://www.imleagues.com/Login.aspx
从那里,我想提交并登录。我已经能够点击登录按钮,但它告诉我我的用户名和密码不正确。我该如何填写这些内容?我以为我用它了:
URL = 'https://www.imleagues.com/Login.aspx'
address = "http://www.imleagues.com/School/Team/Home.aspx?Team=27d6c31187314397b00293fb0cfbc79a"
b = spynner.Browser()
b.show()
b.load(URL)
b.wk_fill('input[name=ctl00$ContentPlaceHolder1$inUserName]', '******')
b.wk_fill('input[name=ctl00$ContentPlaceHolder1$inPassword]', '******')
但显然这不起作用。谢谢你的帮助。
答案 0 :(得分:0)
这对我有用:
import spynner
URL = 'https://www.imleagues.com/Login.aspx'
address = "http://www.imleagues.com/School/Team/Home.aspx?Team=27d6c31187314397b00293fb0cfbc79a"
b = spynner.Browser()
b.show()
b.load(URL)
b.runjs('$("#ctl00_ContentPlaceHolder1_inUserName").val("testUser")')
b.runjs('$("#ctl00_ContentPlaceHolder1_inPassword").val("testPass")')