Quote:
Originally Posted by flightonair
Could you share me the code and the procedure how to auto login? I'm a newbie for Calibre receipe. I love read infzm very week, but it cannot automatically fetch the articles to my kindle 3 device.
Thanks.
|
Code:
needs_subscription = True
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
cookies = mechanize.CookieJar()
br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
request = urllib.urlencode([('loginname', self.username), ('password', self.password),])
response = br.open('http://passport.infzm.com/passport/login', request)
return br