code: def request_sid_cookie(self, username, password):
          
          log.debug("Requesting SID cookie")
          target_url = self._login_url + '?usr={0}&pwd={1}&persist=y'.format(
              username, password
          )
          cookie = urlopen(target_url).read()
          return cookie
docs: Request cookie for permanent session token.