Compare commits
10 Commits
5f3b6f9a5b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f15171147b | ||
|
|
7999ce8108 | ||
|
|
59945861b0 | ||
|
|
a61e86cfa4 | ||
|
|
77eaff9edf | ||
|
|
23209f47f4 | ||
|
|
37dd49f936 | ||
|
|
d59cefff52 | ||
|
|
8b6049bb26 | ||
|
|
936c43b6fa |
@@ -149,6 +149,7 @@ do not work and is not supported here.
|
|||||||
- RLC-423
|
- RLC-423
|
||||||
- RLC-420-5MP
|
- RLC-420-5MP
|
||||||
- RLC-410-5MP
|
- RLC-410-5MP
|
||||||
|
- RLC-510A
|
||||||
- RLC-520
|
- RLC-520
|
||||||
- C1-Pro
|
- C1-Pro
|
||||||
- D400
|
- D400
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from reolinkapi.handlers.api_handler import APIHandler
|
from reolinkapi.handlers.api_handler import APIHandler
|
||||||
from .camera import Camera
|
from .camera import Camera
|
||||||
|
|
||||||
__version__ = "0.1.3"
|
__version__ = "0.1.5"
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class APIHandler(AlarmAPIMixin,
|
|||||||
tgt_filepath = data[0].pop('filepath')
|
tgt_filepath = data[0].pop('filepath')
|
||||||
# Apply the data to the params
|
# Apply the data to the params
|
||||||
params.update(data[0])
|
params.update(data[0])
|
||||||
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None)) as req:
|
with requests.get(self.url, params=params, stream=True, verify=False, timeout=(1, None), proxies=Request.proxies) as req:
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
with open(tgt_filepath, 'wb') as f:
|
with open(tgt_filepath, 'wb') as f:
|
||||||
f.write(req.content)
|
f.write(req.content)
|
||||||
|
|||||||
@@ -46,7 +46,12 @@ class MotionAPIMixin:
|
|||||||
body = [{"cmd": "Search", "action": 1, "param": search_params}]
|
body = [{"cmd": "Search", "action": 1, "param": search_params}]
|
||||||
|
|
||||||
resp = self._execute_command('Search', body)[0]
|
resp = self._execute_command('Search', body)[0]
|
||||||
result = resp['value']['SearchResult']
|
if 'value' not in resp:
|
||||||
|
return []
|
||||||
|
values = resp['value']
|
||||||
|
if 'SearchResult' not in values:
|
||||||
|
return []
|
||||||
|
result = values['SearchResult']
|
||||||
files = result.get('File', [])
|
files = result.get('File', [])
|
||||||
if len(files) > 0:
|
if len(files) > 0:
|
||||||
# Begin processing files
|
# Begin processing files
|
||||||
|
|||||||
Reference in New Issue
Block a user