Hello,
thank you for this great piece of work.
Could you please consider making the constant ISAPI a Client property so that we can change it to whatever is needed. In my case, with a Swann branded 15-100 DVR, it needs to read 'PSIA' instead of 'ISAPI'.
May I suggest
def init(self, host, login=None, password=None, isapi_prefix='ISAPI', timeout=3):
"""
:param host: Host for device ('http://192.168.0.2')
:param login: (optional) Login for device
:param password: (optional) Password for device
:param timeout: (optional) Timeout for request
"""
self.host = host
self.login = login
self.password = password
self.timeout = float(timeout)
self.isapi_prefix = isapi_prefix
self.req = self._check_session()
self.count_events = 1
and use self.isapi_prefix instead of ISAPI in the rest of the code ?
Hello, thank you for this great piece of work. Could you please consider making the constant ISAPI a Client property so that we can change it to whatever is needed. In my case, with a Swann branded 15-100 DVR, it needs to read 'PSIA' instead of 'ISAPI'. May I suggest def init(self, host, login=None, password=None, isapi_prefix='ISAPI', timeout=3): """ :param host: Host for device ('http://192.168.0.2') :param login: (optional) Login for device :param password: (optional) Password for device :param timeout: (optional) Timeout for request """ self.host = host self.login = login self.password = password self.timeout = float(timeout) self.isapi_prefix = isapi_prefix self.req = self._check_session() self.count_events = 1
and use self.isapi_prefix instead of ISAPI in the rest of the code ?
Best regards, Alex