View Single Post
Old 05-19-2012, 02:20 AM   #1
barium
Connoisseur
barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.barium can self-interpret dreams as they happen.
 
Posts: 96
Karma: 20572
Join Date: Sep 2010
Device: None
Alter built-in recipe for IP-based authentication

I have access to the full text of a news site through my institution. Instead of logging in with a user name and password, I click a login link, which sets several cookies (I think) and gives me access to the site.

Calibre has a built-in recipe for subscribers to the site. The built-in recipe doesn't retrieve the full text of articles for me.

I tried replacing the login section of the built-in recipe with the following, which didn't work:

def get_browser(self):
br = BasicNewsRecipe.get_browser()
if self.username is not None and self.password is not None:
br.open('[institutional link]')
br.open('http://online.[x].com/home-page')
return br

That didn't do the trick. (I entered dummy information in the recipe's login fields, as I think my change makes the login fields uselesS).

Do you have any thoughts on how I can get the recipe working with my access method?
barium is offline   Reply With Quote