View Single Post
Old 01-03-2013, 12:52 AM   #1
flyingfoxlee
Member
flyingfoxlee began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2011
Device: kindle 3
when need subscription, login success or fail?

When a site requires a subscription, how to confirm whether login was successful or not. Currently, calibre returns nothing no matter what I put the correct user profile or just anything.
I overwrite get_Browser as follows:
Code:
     def get_browser(self):
         br = BasicNewsRecipe.get_browser()
         if self.username is not None and self.password is not None:
             br.open('login site')
             br.select_form(name = 'mainLoginForm')
             br['username']   = self.username 
             br['password'] =  self.password 
             br.submit()
         return br
flyingfoxlee is offline   Reply With Quote