Exemplo n.º 1
0
 def login(self, response):
     ''' Fill out the login form and return the request'''
     args, url, method = fill_login_form(response.url, response.body, self.login_user, self.login_pass)
     self.log('Logging in...')
     return FormRequest(url,
                        method=method,
                        formdata=args,
                        callback=self.confirm_login,
                        dont_filter=True)
Exemplo n.º 2
0
 def login(self, response):
     ''' Fill out the login form and return the request'''
     args, url, method = fill_login_form(response.url, response.body,
                                         self.login_user, self.login_pass)
     self.log('Logging in...')
     return FormRequest(url,
                        method=method,
                        formdata=args,
                        callback=self.confirm_login,
                        dont_filter=True)
Exemplo n.º 3
0
    def login(self, response):
        """ Fill out the login form and return the request"""
        self.log("Logging in...")
        try:
            args, url, method = fill_login_form(response.url, response.body, self.login_user, self.login_pass)
            return FormRequest(url, method=method, formdata=args, callback=self.confirm_login, dont_filter=True)

        except Exception:
            self.log("Login failed")  # Make this more specific eventually
            return Request(url=self.start_urls[0], dont_filter=True)  # Continue crawling
Exemplo n.º 4
0
    def login(self, response):
        ''' Fill out the login form and return the request'''
        self.log('Logging in...')
        try:
            args, url, method = fill_login_form(response.url, response.body, self.login_user, self.login_pass)
            return FormRequest(url,
                              method=method,
                              formdata=args,
                              callback=self.confirm_login,
                              dont_filter=True)

        except Exception:
            self.log('Login failed') # Make this more specific eventually
            return Request(url=self.start_urls[0], dont_filter=True) # Continue crawling