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 08-07-2018, 12:39 AM   #1
atl068
Member
atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.atl068 could sell banana peel slippers to a Deveel.
 
Posts: 18
Karma: 3134
Join Date: Oct 2016
Device: Onyx Boox m96
Unable to use select_form in mechanized browser

My university uses OKTA for authentication, and then it allows me to access many journals, e.g. NEJM. So, for example, https://www.nejm.org.ezproxy.flinders.edu.au will allow me to read all of the journal articles in New England Journal of Medicine. NEJM has a great RSS feed and I like to use it with Calibre. Alas, the built-in recipe is for direct subscribers.

Thus, I tried to modify the script. However, I ran into a problem. For OKTA, the form doesn't have a "name" but has only an "id". So the br.select_form(name="login") in the built-in script will fail and I can't change it to any other name. The form id appears to be "form17". Looking at the mechanized browser in python, I should be able to use alternative methods like: looking for form with a class containing some names, or the Nth form using nr=17 etc. However, when I use anything other than select_form(name=xxxx), Calibre fails saying that it was unexpected. What am I doing wrong? I just can't figure it out. I tried google and forum searching for referring to the form id instead of name, etc... but to no avail.

Thanks.
atl068 is offline   Reply With Quote
Old 08-07-2018, 02:18 AM   #2
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
IIRC you should just be able to do

select_form(id="whatever")

Make sure you calibre version is up-to-date however, since I added that facility to mechanize relatively recently.
kovidgoyal 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
"Web Browser is unable to establish a secure connection to this web site" Glorfindel Kindle Developer's Corner 62 01-19-2024 12:01 PM
Browser history and search on the browser address bar? ItalianUruguayan Kobo Developer's Corner 0 04-13-2018 05:44 PM
Unable to Scan hroberts89436 Calibre Companion 4 12-11-2016 02:04 PM
How to stop Tag Browser, Details and Cover Browser from showing on startup? stuartro Calibre 1 08-15-2016 11:53 PM
Unable to get source! itimpi Development 5 01-09-2013 12:00 PM


All times are GMT -4. The time now is 03:41 AM.


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