mirror of
https://github.com/Tafkas/fritzbox-munin.git
synced 2023-10-10 13:36:55 +02:00
Support old firmware 6.86 when fetching wifi devices
Resolves: https://github.com/Tafkas/fritzbox-munin/issues/57
This commit is contained in:
parent
d7929f15fc
commit
155cbd5d99
@ -39,6 +39,14 @@ def get_connected_wifi_devices():
|
||||
|
||||
session_id = fh.get_session_id(server, username, password)
|
||||
xhr_data = fh.get_xhr_content(server, session_id, PAGE)
|
||||
if xhr_data[0:8] == b"<script>":
|
||||
#firmware 6.86
|
||||
m = re.search(pattern, xhr_data.decode("utf-8"))
|
||||
if m:
|
||||
connected_devices = int(m.group(1))
|
||||
print("wifi.value %d" % connected_devices)
|
||||
return
|
||||
|
||||
data = json.loads(xhr_data)
|
||||
m = re.search(pattern, data["data"]["drain"][2]["statuses"][-1])
|
||||
if m:
|
||||
|
Loading…
Reference in New Issue
Block a user