Jul-26-2019, 06:47 AM
I want to use Python to login and later download a file. Could someone show how to login based on this code?
<div class="p"> <div id="ctl00_cph1_lg1_ch1_d1" class="rc_bg_bl"><div id="ctl00_cph1_lg1_ch1_d2" class="rc_tl_bl"><div id="ctl00_cph1_lg1_ch1_d3" class="rc_tr_bl"><div id="d4" class="rc_c"> <table class="rc_t"> <tr><td><div id="ctl00_cph1_lg1_ch1_divText">MEMBER LOGIN</div></td><td><div id="ctl00_cph1_lg1_ch1_divLink" class="hlink"></div></td><td align="right"><div id="ctl00_cph1_lg1_ch1_divIcon" class="hicon"></div></td></tr> </table> </div></div></div></div> <div class="bbf" style="padding:6px;"> <div id="ctl00_cph1_lg1_pnlLogin" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_cph1_lg1_btnLogin')"> <table cellpadding="4" cellspacing="0" width="100%" border="0" style="margin-bottom:10px;"> <tr> <td>Email/Username:</td> <td><input name="ctl00$cph1$lg1$txtEmail" type="text" id="ctl00_cph1_lg1_txtEmail" style="width:160px;" /></td> </tr> <tr> <td>Password:</td> <td><input name="ctl00$cph1$lg1$txtPassword" type="password" id="ctl00_cph1_lg1_txtPassword" style="width:160px;" /></td> </tr> <tr> <td></td> <td><input id="ctl00_cph1_lg1_chkRemember" type="checkbox" name="ctl00$cph1$lg1$chkRemember" /><label for="ctl00_cph1_lg1_chkRemember">Remember Me</label></td> </tr> <tr><td colspan="2"><span id="ctl00_cph1_lg1_lblMessage" style="color:Red;"></span></td></tr> <tr> <td></td> <td><input type="submit" name="ctl00$cph1$lg1$btnLogin" value="Login" id="ctl00_cph1_lg1_btnLogin" class="fancy" with="80px;" style="height:28px;" /></td> </tr> </table> <table cellpadding="4" cellspacing="0" width="100%" border="0"> <tr> <td><a id="ctl00_cph1_lg1_lnkRegister" href="register.aspx">Register</a></td> <td align="center"><a id="ctl00_cph1_lg1_btnResendEmail" href="javascript:__doPostBack('ctl00$cph1$lg1$btnResendEmail','')">Resend Confirmation</a></td> <td align="right"><a id="ctl00_cph1_lg1_lnkForgot" href="support/Forgot.aspx">Forgot</a></td> </tr> </table> </div> </div> </div>