Fix Uptime json error and add cpu temperature #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

[root@rl8-18 asus]# python3.11 ShowRouterInfo.py
{
"uptime":"Mon, 13 May 2024 09:44:45 +0800(64882 secs since boot)"
}
"Mon, 13 May 2024 09:44:45 +0800
64882
{"since":""Mon, 13 May 2024 09:44:45 +0800", "uptime":"64882"}
Traceback (most recent call last):
File "/root/asus/ShowRouterInfo.py", line 5, in
print("Uptime : " + str(ri.get_uptime()))
^^^^^^^^^^^^^^^
File "/root/asus/RouterInfo.py", line 78, in get_uptime
return json.loads('{' + '"since":"{}", "uptime":"{}"'.format(since, up) + '}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 12 (char 11)