View Single Post
Old 07-15-2009, 08:50 AM   #605
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by f1doc View Post
Hi kiklop!

I've read over this lots of times, and i admit it's a bit over my head. i can see that i need to add the log in stuff, but honestly, i'm not quite tech-savvy enough for this. i'm an anesthetist and emergency doctor, so i'm not stupid, but this stuff DOES get complicated

so any advice you can give me, stuff i can almost copy/paste, would be SO appreciated.
Add this to your recipe and it should work:

Code:
    needs_subscription   = True    

    def get_browser(self):
        br = BasicNewsRecipe.get_browser()
        if self.username is not None and self.password is not None:
            br.open('http://content.nejm.org/cgi/login?uri=%2F')
            br.select_form(nr=0)
            br['username'] = self.username
            br['code'    ] = self.password
            br.submit()
        return br
kiklop74 is offline