Thread: Calibre recipes
View Single Post
Old 11-07-2009, 04:54 PM   #51
niaiserie
Junior Member
niaiserie began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2009
Device: Sony PRS-600
script login

I'm having trouble getting a script to login.
Here's the code:
br.open('https://ssl.thenation.com/user/login.mhtml')
br.select_form('tn-login')

The site html reads:
<form id="tn-login" action="https://ssl.thenation.com/user/login.mhtml" method="post">

The error output is below.
Is there any way this can be fixed either in the script or, if this type of request isn't supported, in the API?


ERROR: Conversion Error: <b>Failed</b>: Fetch news from The Nation - print edition

Fetch news from The Nation - print edition
InputFormatPlugin: Recipe Input running Python function terminated unexpectedly
no form matching name 'tn-login' (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 90, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 19, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 721, in run
File "site-packages\calibre\customize\conversion.py", line 208, in __call__
File "site-packages\calibre\web\feeds\input.py", line 60, in convert
File "site-packages\calibre\web\feeds\news.py", line 509, in __init__
File "c:\docume~1\greg\locals~1\temp\calibre_0.6.20_5kl 0xo_recipes\recipe0.py", line 54, in get_browser
br.select_form('tn-login')
File "site-packages\mechanize-0.1.11-py2.6.egg\mechanize\_mechanize.py", line 530, in select_form
mechanize._mechanize.FormNotFoundError: no form matching name 'tn-login'
niaiserie is offline   Reply With Quote