View Single Post
Old 09-03-2010, 08:41 AM   #7
olaf
Enthusiast
olaf is on a distinguished road
 
Posts: 43
Karma: 50
Join Date: May 2009
Device: Kindle3
I am trying to download a local newspaper, but my login credentials work the same way as incorrect credentials - the local articles do not appear in the output. Given the HTML in the signon page shown below, is my recipe signon shown at the bottom incorrect somehow?
______________________________
HTML:
<!-- TEMPLATE: BEGIN: csp/common/loginForm.vm -->

<div class="reg_login_box_no_newUserForm">
<div class="reg_login_box_header">Returning Users: Log in</div>
<form name="Login_form" action="https://home.telegram.com/clickshare/cspLogin.do;jsessionid=C65F9FAB8144BDEE5D1E0C50B5C 9C2D7" method="post">
<input type="hidden" name="CSTargetURL" value="http://www.telegram.com/apps/pbcs.dll/frontpage" />
<input type="hidden" name="CSLoginOnly" value="true" />
<input type="hidden" name="CSResumeURL" value="/clickshare/authenticateUserSubscription.do" />
<input type="hidden" name="com.clickshare.servlet.AuthRequestObject" value="CSAuthReq-03517267009" />
<input type="hidden" name="CSParamsToPassNames" value="CSTargetURL|CSLoginOnly|CSResumeURL|com.cli ckshare.servlet.AuthRequestObject|CSParamsToPassNa mes" />

<table border="0" cellpadding="0" cellspacing="0" width="420">
<tr>
<td valign="top" width="200">
Email address:<br />
<input type="text" name="userLogin.userName" value="" size="20" maxlength="125" /> </td>
<td width="20">&nbsp;</td>
<td valign="top" width="200">
Password:<br />
<input type="password" name="userLogin.password" value="" size="20" maxlength="125" />

__________________________________________________ __________________

Recipe Signon:

def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('https://home.telegram.com/clickshare/authenticateUserSubscription.do?')
br.select_form(name='Login_form')
br['userLogin.userName'] = self.username
br['userLogin.password'] = self.password
br.submit()
return br
olaf is offline   Reply With Quote