Hi,
I'm trying to make a new recipe for the newspaper on
www.nd.nl.
To get to the proper pages one first has to login.
I copied the recipe 'volksrant_sub.recipe' and tried to mod it to my needs.
However, my recipe seems to stop during the login part.
The
www.nd.nl source code says:
Quote:
<form id="login" enctype="application/x-www-form-urlencoded" method="post" action="https://www.nd.nl/account/login">
<a id="registerlink" href="javascript:void(0);" onclick="showRegistrationLightbox('https://www.nd.nl/payment/index/index/step/1/immediateclose/1'); return false;">Registreer</a>
<label for="username" class="required">of log in</label>
<input type="text" name="username" id="username" value="Gebruikersnaam" onclick="if(this.value == 'Gebruikersnaam'){this.value=''};" tabindex="1" />
<input type="text" name="password_text" id="password_text" value="Wachtwoord" tabindex="3" />
<input type="password" name="password" id="password" value="" tabindex="2" />
<input type="hidden" name="referer" value="/" id="referer" />
<input type="submit" name="submit" id="submit" value="" class="ok" />
<a href="/account/password" title="Wachtwoord vergeten" class="lostpass">Wachtwoord vergeten</a></form>
|
In my recipe I interpreted this as:
Quote:
def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('https://www.nd.nl/account/login')
br.form = br.forms().next()
br['username'] = self.username
br['password_text'] = self.password
br.submit()
return br
|
I have a valid username and password, with which i can login online. Those username and password are known within my calibre configuration.
Can someone tell me what goes wrong?
Kind regards.