Git Product home page Git Product logo

jdrouterpush's Introduction

  • 👋 Hi, I’m @leifengwl
  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

jdrouterpush's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jdrouterpush's Issues

2代设备适配问题

第188行,

satisfiedTimes = pointInfo["satisfiedTimes"]

建议改成:
satisfiedTimes = pointInfo.get("satisfiedTimes", '不适用坐享其成计划')

主要是我2代的AX1800似乎没有这个字段,如果没有,可以用get默认值来防止报错。

运行python JDRouterPush.py返回报错

大佬你好,

刚在黑群晖上面Docker部署了大佬您的项目,前面都还算顺利,但到了运行python JDRouterPush.py 这一步,返回错误如下:
root@python:~ $ python JDRouterPush.py
Traceback (most recent call last):
File "/root/JDRouterPush.py", line 5, in
import GlobalVariable
File "/root/GlobalVariable.py", line 71
DEVICENAME = os.environ.get(XX55BB:JDC02_XX55BB) # 设备名称 mac后6位:设置的名称,多个使用&连接
^
SyntaxError: invalid syntax

GlobalVariable.py 上面关于“”DEVICENAME“” 我是这样填写:
DEVICENAME = os.environ.get(xx55BB:JDC02_xx55BB) # 设备名称

请问是否格式不对呢?烦请大佬可以在百忙中指点一下,非常感激,另外祝你和家人国庆快乐

pushplus推送有问题

同时配置了Bark和pushplus,Bark推送成功了,但是pushplus没有收到推送,看了下日志,也不知道是什么情况

欢迎使用JDRouterPush!
Request routerActivityInfo failed!
Request routerActivityInfo failed!
Request routerActivityInfo failed!
pushplus推送成功!

当前网速信息中的变量有误

文件JDServiceAPI.py的113行,下载速度引用了错误的变量
download_str = str(round(int(upload)/10/1024,2)) + "MB/s"
download_str = str(round(int(download)/10/1024,2)) + "MB/s"

看了iss,重新同步了还是不行,显示代码行数有两个不一样

Run python JDRouterPush.py
Traceback (most recent call last):
欢迎使用JDRouterPush!
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 295, in
Request routerActivityInfo failed!
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 288, in main
无法获取插件信息!
todayPointDetail()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 124, in todayPointDetail
JDServiceAPI.getControlDevice(mac,2)
File "/home/runner/work/JDRouterPush/JDRouterPush/JDServiceAPI.py", line 71, in getControlDevice
result = json.loads(res["result"])
File "/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/json/init.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
Error: Process completed with exit code 1.
一个一代64坐享,一个2代64G

点了运行毫无反应

大佬你好!我配置好了,点了手动运行毫无反应,也没收到邮件,是不是需要明天6点半才会推送?

关于getAuthorization认证模块问题

大佬你好,感谢你的代码,很受启发!
有个问题关于认证模块,hmacKey这个值是哪里来的呢?
把service_pram改成自己的设备后,认证就会失败。可能是这个hmacKey没有设置对,抓包并没有发现这个值。
希望能指点一下,感谢。

企业微信消息没有推送

没有报错,查看Actions提示:企业微信应用消息推送的变量未设置或未设置完全!!

我设置过ACCESSTOKEN了

刚才看到更新重新fork了一次,有错误提示,什么问题

Run python JDRouterPush.py
Traceback (most recent call last):
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 295, in
欢迎使用JDRouterPush!
Request routerActivityInfo failed!
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 288, in main
todayPointDetail()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 125, in todayPointDetail
JDServiceAPI.getControlDevice(mac,3)
File "/home/runner/work/JDRouterPush/JDRouterPush/JDServiceAPI.py", line 110, in getControlDevice
pcdn_list = data["pcdn_list"]
TypeError: string indices must be integers
Error: Process completed with exit code 1.

设备26台 一直报错

设备26台 一直报错
另外 能否加个功能 坐享今天打绿色勾了出现一个提示 今日已坐享完成

还更新吗,今天开始又不能推送了

Run python JDRouterPush.py
Traceback (most recent call last):
欢迎使用JDRouterPush!
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 294, in
Request routerActivityInfo failed!
Request routerActivityInfo failed!
Request routerActivityInfo failed!
无法获取插件信息!
信息如下:
无法获取插件信息!
信息如下:
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 289, in main
resultDisplay()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 230, in resultDisplay
point_infos += "\n - 当前网速:" + pointInfo["speed"]
KeyError: 'speed'
Request getControlDevice failed!
Request getControlDevice failed!
Error: Process completed with exit code 1.

出现这个提示

有大哥教一下怎么让设备定时重启么

账户下绑定了两个设备,因为光猫设定好了每隔3天定时重启一次,想让无线宝跟着光猫一起重启,但是APP上只能选择周几重启,功能对不上。刚好看到IP切换这块好像有重启的代码,能教一下怎么移植出来么?

今早没有推送发现有错误,重新fork了一遍还是错误,代码如下

Run python JDRouterPush.py
Traceback (most recent call last):
欢迎使用JDRouterPush!
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 296, in
Request routerActivityInfo failed!
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 289, in main
todayPointDetail()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 119, in todayPointDetail
pointOperateRecordsShow(mac)
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 135, in pointOperateRecordsShow
"pageSize": records_num,
NameError: name 'records_num' is not defined
Error: Process completed with exit code 1.

docker下推送配置

1.https://hub.docker.com/r/nevinee/python 按照说明配置好docker;把https://github.com/leifengwl/JDRouterPush.git打包的文件拷贝在映射目录python下
2.先执行docker exec -it python bash
然后 pip install requests markdown pytz
3.GlobalVariable.py里把环境变量填好
4.在映射目录python下加入crontab.list文件,内容如下:36 6 * * * python JDRouterPush.py
5、docker-compose配置示例:
version: "2.0"
services:
python:
image: nevinee/python
container_name: python
restart: always
tty: true
network_mode: bridge
hostname: python
volumes:
- /opt/docker/python/:/root

推送失败,不懂怎么回事,是wsky不行了吗,有没有大佬帮忙解答一下,咱也不是这个专业的

Run python JDRouterPush.py
python JDRouterPush.py
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.9.2/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.2/x64/lib
WSKEY: ***
DEVICENAME:
RECORDSNUM:
SERVERPUSHKEY: ***
TG_BOT_TOKEN:
TG_USER_ID:
BARK:
PUSHPLUS: ***
Traceback (most recent call last):
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 403, in
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 391, in main
records_num = int(RECORDSNUM)
ValueError: invalid literal for int() with base 10: ''
Error: Process completed with exit code 1.

这几天没推送,看了下报错好多,啥都没改,不知道啥原因

Run python JDRouterPush.py
python JDRouterPush.py
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.9.5/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.5/x64/lib
WSKEY: ***
DEVICENAME:
RECORDSNUM:
SERVERPUSHKEY: ***
TG_BOT_TOKEN:
TG_USER_ID:
BARK:
PUSHPLUS: ***
ACCESSTOKEN:
CORPID:
CORPSECRET:
TOUSER:
AGENTID:
THUMB_MEDIA_ID:
AUTHOR:
Traceback (most recent call last):
欢迎使用JDRouterPush!
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
Request routerActivityInfo failed!
httplib_response = self._make_request(
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 1345, in getresponse
无法获取插件信息!
信息如下:
response.begin()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 276, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 1345, in getresponse
response.begin()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/http/client.py", line 276, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 294, in
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 289, in main
resultDisplay()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 259, in resultDisplay
NoticePush.server_push(title, markdownContent.replace("- ***", "```"))
File "/home/runner/work/JDRouterPush/JDRouterPush/NoticePush.py", line 19, in server_push
res = requests.post(url=server_push_url, data=params)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 677, in send
history = [resp for resp in gen]
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 677, in
history = [resp for resp in gen]
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 237, in resolve_redirects
resp = self.send(
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Error: Process completed with exit code 1.

上传数据量

请问有抓到 “查询每天上传数据量” 的接口吗?我看“赚钱宝助手云监工”这个网站好像能查询机器的上传量。但是找不到这个接口,不知道他们是从哪来的,app上也没有这个接口。

sever酱推送有问题

源码:
params = {
"text": text,
"desp": desp
}
res = requests.post(url=server_push_url, params=params)
应更改为:
params = {
"title": text,
"desp": desp
}
res = requests.post(url=server_push_url, data=params)

今天推送出现错误

Run python JDRouterPush.py
Traceback (most recent call last):
欢迎使用JDRouterPush!
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 294, in
Request routerActivityInfo failed!
main()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 289, in main
resultDisplay()
File "/home/runner/work/JDRouterPush/JDRouterPush/JDRouterPush.py", line 230, in resultDisplay
point_infos += "\n - 当前网速:" + pointInfo["speed"]
KeyError: 'speed'
Request routerActivityInfo failed!
Request routerActivityInfo failed!
无法获取插件信息!
信息如下:
无法获取插件信息!
信息如下:
无法获取插件信息!
信息如下:
Request getControlDevice failed!
Request getControlDevice failed!
Error: Process completed with exit code 1.

突然不能正常推送了

Run python JDRouterPush.py
2
python JDRouterPush.py
3
shell: /usr/bin/bash -e {0}
4
env:
5
pythonLocation: /opt/hostedtoolcache/Python/3.9.5/x64
6
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.5/x64/lib
7
WSKEY: ***
8
DEVICENAME:
9
RECORDSNUM:
10
SERVERPUSHKEY:
11
TG_BOT_TOKEN:
12
TG_USER_ID:
13
BARK:
14
PUSHPLUS:
15
ACCESSTOKEN:
16
CORPID: ***
17
CORPSECRET: ***
18
TOUSER: ***
19
AGENTID: ***
20
THUMB_MEDIA_ID: ***
21
AUTHOR: ***
22
欢迎使用JDRouterPush!
23
Traceback (most recent call last):
24
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
25
httplib_response = self._make_request(
26
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
27
self._validate_conn(conn)
28
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
29
conn.connect()
30
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect
31
self.sock = ssl_wrap_socket(
32
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
33
ssl_sock = ssl_wrap_socket_impl(
34
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
35
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
36
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 500, in wrap_socket
37
return self.sslsocket_class._create(
38
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 1040, in _create
39
self.do_handshake()
40
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 1309, in do_handshake
41
self._sslobj.do_handshake()
42
ConnectionResetError: [Errno 104] Connection reset by peer
43

44
During handling of the above exception, another exception occurred:
45

46
Traceback (most recent call last):
47
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
48
resp = conn.urlopen(
49
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
50
retries = retries.increment(
51
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
52
raise six.reraise(type(error), error, _stacktrace)
53
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
54
raise value.with_traceback(tb)
55
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
56
httplib_response = self._make_request(
57
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
58
self._validate_conn(conn)
59
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
60
conn.connect()
61
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect
62
self.sock = ssl_wrap_socket(
63
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
64
ssl_sock = ssl_wrap_socket_impl(
65
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
66
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
67
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 500, in wrap_socket
68
return self.sslsocket_class._create(
69
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 1040, in _create
70
self.do_handshake()
71
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/ssl.py", line 1309, in do_handshake
72
self._sslobj.do_handshake()
73
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
74

75
During handling of the above exception, another exception occurred:
76

77
Traceback (most recent call last):
78
File "/home/runner/work/push/push/JDRouterPush.py", line 294, in
79
main()
80
File "/home/runner/work/push/push/JDRouterPush.py", line 286, in main
81
todayPointIncome()
82
File "/home/runner/work/push/push/JDRouterPush.py", line 16, in todayPointIncome
83
res = requests.get(GlobalVariable.jd_base_url + "todayPointIncome", headers=GlobalVariable.headers)
84
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/api.py", line 76, in get
85
return request('get', url, params=params, **kwargs)
86
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/api.py", line 61, in request
87
return session.request(method=method, url=url, **kwargs)
88
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
89
resp = self.send(prep, **send_kwargs)
90
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
91
r = adapter.send(request, **kwargs)
92
File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
93
raise ConnectionError(err, request=request)
94
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
95
Error: Process completed with exit code 1.

出现错误:'Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')

出现错误: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
准备重新执行...
出现错误: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
准备重新执行...
出现错误: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
准备重新执行...
出现错误: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
准备重新执行...
出现错误: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
请问如何处理?

这几天不能显示具体插件类型A、B、C、D了

欢迎使用JDRouterPush!
Request routerActivityInfo failed!
插件请求数据: [{'status': '正常', 'nickname': '插件X', 'name': '插件X', 'cache_size': '82041152'}]
插件请求数据: [{'status': '正常', 'nickname': '插件X', 'name': '插件X', 'cache_size': '56461356'}]

只能和APP上一样显示插件X

更新之后 部分账号会出问题

  • 只有3台一代jdc的账号正常。
  • 还有一个朋友的账号带360v6的合作款,会报错。
欢迎使用JDRouterPush!
获取routerActivityInfo失败
获取routerActivityInfo失败
Traceback (most recent call last):
  File "JDRouterPush.py", line 267, in <module>
    main(WSKEY,SERVERPUSHKEY)
  File "JDRouterPush.py", line 260, in main
    resultDisplay(SERVERPUSHKEY)
  File "JDRouterPush.py", line 188, in resultDisplay
    satisfiedTimes = pointInfo["satisfiedTimes"]
KeyError: 'satisfiedTimes'
  • 看了下就是新增的版本更新检测等的代码,临时解决办法可以直接屏蔽这些功能。
  • 建议加一个mac判断,对于非官方的硬件的mac不使用除查询积分外的各种查询功能。
  • 京东云 官方硬件mac范围 DC:D8:7C

Screenshot_20210303-131427

"查询积分接口失败"

是否现在已经失效了?我用的stream抓包,点击无线宝app的“积分管理”,会提示"查询积分接口失败"。

这个地方的代码好像有问题

for info in pointInfos:
mac = info["mac"]
MACS.append(mac)
routerActivityInfo(mac)
routerAccountInfo(mac)
pointOperateRecordsShow(mac)
JDServiceAPI.getListAllUserDevices()
for mac in MACS:
JDServiceAPI.getControlDevice(mac, 2)
JDServiceAPI.getControlDevice(mac, 3)

想推送通知的时候加上插件的容量,看了代码发现这个地方有问题。

脑子短路了,看多了 js 混淆了。逻辑没问题。

貌似只是因为在最后生成 notifyContentJson 的时候没有加入这些信息。

获取设备失败

Traceback (most recent call last):
  File "JDRouterPush.py", line 295, in <module>
    main()
  File "JDRouterPush.py", line 288, in main
    todayPointDetail()
  File "JDRouterPush.py", line 121, in todayPointDetail
    JDServiceAPI.getListAllUserDevices()
  File "/mnt/mmc0/work/JDRouterPush/JDServiceAPI.py", line 57, in getListAllUserDevices
    resultLists = res["result"][0]["list"]
KeyError: 0

getListAllUserDevices的API失效问题

如果是白天运行具体时间段不确定,大概是0点到8点。
GlobalVariable.jd_service_url + "listAllUserDevices" 这个接口就会报错。

Traceback (most recent call last):
  File "JDRouterPush.py", line 295, in <module>
    main()
  File "JDRouterPush.py", line 288, in main
    todayPointDetail()
  File "JDRouterPush.py", line 121, in todayPointDetail
    JDServiceAPI.getListAllUserDevices()
  File "/mnt/mmc0/work/JDRouterPush/JDServiceAPI.py", line 57, in getListAllUserDevices
    resultLists = res["result"][0]["list"]
KeyError: 0

直接输出返回的json发现

{'result': {}, 'error': {'errorInfo': 'token invalid', 'errorCode': '401'}, 'status': 100}

但是如果中午12点之后运行又没有问题。

最后抓包发现是时间不对。
默认time使用utc时间,改成系统时间解决问题(系统时间东八区)

time = datetime.datetime.unow().strftime("%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z"

因为我是本地运行,actions应该本身本地时间就是utc时间吧可能不会报错。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.