linksyse900.py
def _update_info(self):
        """Ensure the information from the Linksys router is up to date.
        Return boolean if scanning successful.
        """
        _LOGGER.info("Loading wireless clients...")

        login_payload = {
            "http_username": self.username,
            "http_passwd": self.password,
            "action": "Apply",
            "change_action": "",
            "submit_type": "",
            "submit_button": "login"
        }

        login_url = 'http://{}/login.cgi'.format(self.host)

        # Login to get a session
        login_response = requests.post(login_url, data = login_payload)

        # Extract the session id
        session_id = self.get_session_id(login_response.text)

        # Contruct the data url with the session id
        data_url = 'http://{}/WL_ClientList.asp;session_id={}'.format(self.host, session_id)

        # Get the data
        data_page = requests.get(data_url)
        result = self.parse_macs.findall(data_page.text)

        # Logging off is unnecessary, as the session expires in a few minutes

        if result:
            self.last_results = result
            return True

        return False
Ensure the information from the Linksys router is up to date.
        Return boolean if scanning successful.
        
Ensure the information from the Linksys router is up to date.
Return boolean if scanning successful.
Ensure the information from the Linksys router is up to date . Return boolean if scanning successful .
def _update_info(self):
        _LOGGER.info("Loading wireless clients...")
        login_payload = {
            "http_username": self.username,
            "http_passwd": self.password,
            "action": "Apply",
            "change_action": "",
            "submit_type": "",
            "submit_button": "login"
        }
        login_url = 'http://{}/login.cgi'.format(self.host)
        login_response = requests.post(login_url, data = login_payload)
        session_id = self.get_session_id(login_response.text)
        data_url = 'http://{}/WL_ClientList.asp;session_id={}'.format(self.host, session_id)
        data_page = requests.get(data_url)
        result = self.parse_macs.findall(data_page.text)
        if result:
            self.last_results = result
            return True
        return False
def _update_info ( self ) : _LOGGER . info ( "Loading wireless clients..." ) login_payload = { "http_username" : self . username , "http_passwd" : self . password , "action" : "Apply" , "change_action" : "" , "submit_type" : "" , "submit_button" : "login" } login_url = 'http://{}/login.cgi' . format ( self . host ) login_response = requests . post ( login_url , data = login_payload ) session_id = self . get_session_id ( login_response . text ) data_url = 'http://{}/WL_ClientList.asp;session_id={}' . format ( self . host , session_id ) data_page = requests . get ( data_url ) result = self . parse_macs . findall ( data_page . text ) if result : self . last_results = result return True return False
Ensure the information from the Linksys router is up to date.
Ensure the information from the Linksys router is up to date .
"""Ensure the information from the Linksys router is up to date.
        Return boolean if scanning successful.
        """ # Login to get a session # Extract the session id # Contruct the data url with the session id # Get the data # Logging off is unnecessary, as the session expires in a few minutes
self