3
I would like to log in to this site http://www.ciee.org.br/portal/LOGIN.ASP
where your form:
<form name="frmLogin" method="post" action="validalogin.asp" >
<span>Login:</span>
<span>
<input title="Informe seu login (inclusive LETRAS e '*' quando houver)" name="usuario" type="text" size="20" maxlength="70" onFocus="limpa()">
</span>
<span>Senha:</span>
<span>
<input title="Informe a senha fornecida pelo CIEE" name="passwd" type="password" value="" size="15" maxlength="15"></span>
<br/>
<center><input type="button" value="ok" onClick="document.frmLogin.submit();" style="cursor:pointer;">
</center>
</form>
I tried the following:
import urllib
url = 'http://www.ciee.org.br/portal/LOGIN.ASP'
parametros = urllib.urlencode({'usuario':'usr', 'passwd': 'psw'})
html = urllib.urlopen(url, parametros).read()
print html
but it didn’t work, I think it’s because of the button
Can someone help me?
Don’t put never actual login data - prinicpaemtne password, no online resource - always replace the values you have with "*" or anything else.
– jsbueno
Need to be using urllib? If not a necessity, you can do via Lenium.
– Denis Callau
For those who tried to edit to remove credentials: the right is to signal for moderation. Credentials remain visible in editing history if you just edit.
– Oralista de Sistemas
Just like @Deniscallau said, if you don’t need to use urllib, try using Selenium, I think it gets easier.
– Gabriel Belini