Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2012, 07:57 AM   #1
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 154
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
login

When running a recipe that involves a login. It always show the following message:

Spoiler:
InputFormatPlugin: Recipe Input running
Python function terminated unexpectedly
No articles found, aborting (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 192, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 979, in run
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\recipe_ input.py", line 105, in convert
File "site-packages\calibre\web\feeds\news.py", line 881, in download
File "site-packages\calibre\web\feeds\news.py", line 1033, in build_index
ValueError: No articles found, aborting


But I've checked the parsing repeatedly and think it's a result of failing to login.

My code involving login is as follows:


Spoiler:
def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('THE WEBSITE LOGIN LINK')
br.select_form(nr = 0)
br['loginname'] = self.username
br['password'] = self.password
br.submit()
return br


I don't know if I got it right. When I intentionally gave an incorrect password, however, the error was the same ( "No articles found, aborting") and Calibre didn't say the password is wrong. That makes me think all the whole thing is because of the login.

Here is the website code regarding login:

Spoiler:
<div id="passport">

<div class="title"><h2>Log in</h2></div>

<div class="singin">

<form id="loginForm">

<div class="signinTitle" >

<span class="regTips" id="logTips"></span>

</div>

<ul class="inputBox">

<li class="loginname">

<label>email</label>

<input id="nameInput" type="text" name="loginname" maxlength="30" value="" onfocus="hideTips(jQuery('#nameInput'))">

</li>

<li class="password">

<label>password</label>

<input id="pwdInput" type="password" name="password" maxlength="16" value="" onfocus="hideTips(jQuery('#pwdInput'))">



</li>

<li id="chechbox">

<p class="tip">

<input name="remember" type="checkbox" checked="checked"/>

<span>remember me</span>

<span class="forgetPwd"><a href="http://passport.infzm.com/passport/resetPassWord" >forgot password</a></span>

</p>

</li>

<li class="submit clearfix">

<input type="submit" id="submitbutton" title="submit" value="login" onclick="login(jQuery('#loginForm'));return false"></input>

</li>

</ul>

</form>


But I still can't see why the login failed.

Last edited by Steven630; 07-19-2012 at 08:00 AM.
Steven630 is offline   Reply With Quote
Old 07-21-2012, 03:18 AM   #2
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 154
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
I'm now certain that the error was because of the login. Can anyone please take a look and tell me what has gone wrong?
Steven630 is offline   Reply With Quote
Advert
Old 07-21-2012, 08:20 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont have the time to look at your recipe but in general if you want to debug a login, what you do is after the login you fetch the page and look for some text like Welcome, or Sign Out or whatever to verify that the login worked. There are several builtin recipes that use this strategy.
kovidgoyal is offline   Reply With Quote
Old 07-21-2012, 11:18 AM   #4
Steven630
Groupie
Steven630 began at the beginning.
 
Posts: 154
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Thank you. There is only one form in the page, so I used nr=0. Then the names for username and password in br are all correct. So I am at a loss.
Steven630 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Website login sure seems to have improved taming Kobo Reader 5 10-23-2011 10:27 AM
Content Kindle 3 Can't Login on SafariBooksOnline BSalita Amazon Kindle 14 09-17-2010 04:02 AM
Can't login onto Sony Ebookstore Mrgauth Sony Reader 19 11-14-2009 11:49 PM
Kindle Login rubikscube99 Amazon Kindle 20 03-12-2009 07:19 PM


All times are GMT -4. The time now is 12:47 AM.


MobileRead.com is a privately owned, operated and funded community.