0

我正在尝试在此站点上填写我的用户名和密码: 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]', '******')

但显然这不起作用。谢谢你的帮助。

4

1 回答 1

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")')
于 2013-03-26T09:19:24.757 回答