def login(self): self.assertNonAnonymous(self.__user_name) self.__cookie_jar = cookielib.CookieJar() self.__opener = fetcherlib.buildTypicalOpener(self.__cookie_jar, self.__proxy_url) try: self.__tryLogin() except: self.__cookie_jar = None self.__opener = None raise
def login(self) : self.assertNonAnonymous(self.__user_name) cookie_jar = cookielib.CookieJar() opener = fetcherlib.buildTypicalOpener(self.__cookie_jar, self.__proxy_url) post_dict = { "username" : self.__user_name, "password" : self.__passwd, "redirect" : "", "login" : "\xc2\xf5\xee\xe4", } data = self.__readUrlRetry(NNMCLUB_LOGIN_URL, urllib.urlencode(post_dict), opener=opener) self.assertLogin("[ %s ]" % (self.__user_name) in data, "Invalid login") self.__cookie_jar = cookie_jar self.__opener = opener
def login(self) : self.__opener = fetcherlib.buildTypicalOpener(proxy_url=self.__proxy_url)