python post login form timeout -


i'm try wirte code login other webpage. after send command line login, script started, result notification timeout connected webpage don't know problem in code. i'm using python 2.7.11 suggestions?

webpage code

<form id="registration" action="/auth/login" method="post">                <strong style="color:red"><br></strong>                 <ul class="form register">                     <li>                         <label>email *</label>                         <span class="txt">                             <input class="main-login" name="loginform[email]" id="loginform_email" type="text">                        </span>                     </li>                     <li>                         <label>password *</label>                         <span class="txt">                             <input class="main-login" name="loginform[password]" id="loginform_password" type="password">                        </span>                     </li>                     <li>                         <div class="agree">                             <input id="ytagr" type="hidden" value="0" name="loginform[rememberme]"><input class="ch" id="agr" checked="checked" name="loginform[rememberme]" value="1" type="checkbox">                            <label for="loginform_rememberme">remember me</label>                        </div>                     </li>                     <li style="display: none">                         <label>enter code *</label>                          <div class="capcha" style="width: 300px;">                                                         <img visible="" width="118" height="44" btn_id="gr3tefg_1" id="yw0" src="/auth/captcha/v/56a07618bbd42" alt="">                                                        <div class="code">                                 <span class="txt sm">                                     <input name="loginform[verifycode]" id="loginform_verifycode" type="text"><br>                                 </span>                                 <a id="gr3tefg_1"></a><div><a id="yw0_button" href="/auth/captcha/refresh/1">refresh</a></div>                             </div>                         </div>                     </li>                     <li>                         <label></label>                         <a class="btn send-message" onclick="document.forms.registration.submit();"><span>enter</span></a>                     </li>                     <li>                         <label></label>                         <a href="/account/forgotpassword" class="restore">forgot password</a>                     </li>                 </ul>                 </form> 

my app code:

import urllib import urllib2 import cookielib ...     username = "xxxxxxxxxxx"     password = "xxxxxxxxxxx"     cj = cookielib.cookiejar()     opener = urllib2.build_opener(urllib2.httpcookieprocessor(cj))     login_data = urllib.urlencode({'loginform[email]' : username, 'loginform[password]': password})     opener.open("https://rapidgator.net/auth/login", login_data)     resp = opener.open("http://rapidgator.net/filesystem/index") ... 


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -