京东云无线宝积分推送,支持查看多设备积分使用情况

Overview

JDRouterPush

项目简介

本项目调用京东云无线宝API,可每天定时推送积分收益情况,帮助你更好的观察主要信息

更新日志

2021-03-02:

  1. 查询绑定的京东账户
  2. 通知排版优化
  3. 脚本检测更新
  4. 支持Server酱Turbo版

2021-02-25:

  1. 实现多设备查询
  2. 查询今日收益,总收益,可用收益
  3. 设备在线天数
  4. 可查看最近七条积分动态

使用说明

Actions 方式

  1. Fork 本项目
  2. 获取京东云无线宝wskey
  • 目前只用Android抓包演示(抓包工具有很多,这里使用HttpCanary作为演示)

  • 打开HttpCanary点击右下角按钮开始抓包

  • 然后再打开京东云无线宝,点击积分管理

  • 回到HttpCanary,右上角找到搜索,搜索wskey

  • 然后随便点击一条进去,找到请求里面的wskey ,复制值

  1. 点击项目 Settings -> Secrets -> New Secrets 添加以下 2 个 Secrets,其中server酱微信推送的sckey可参阅微信订阅通知
Name Value
WSKEY 从京东云无线宝中获取
SERVERPUSHKEY server酱推送的sckey

  1. 开启 Actions 并触发每日自动执行

Github Actions 默认处于关闭状态,需要手动开启 Actions ,执行一次工作流,验证是否可以正常工作。

图示

如果需要修改每日任务执行的时间,请修改 .github/workflows/JDPush.yml,在第 7行左右位置找到下如下配置。

  schedule:
    - cron: '30 22 * * *'
    # cron表达式,Actions时区是UTC时间,需要往前推8个小时  此时为6点30推送
    # 示例: 每天晚上22点30执行 '30 14 * * *'

如果收到了 GitHub Action 的错误邮件,请检查 WSKEY是不是失效了,如果退出或重登都会导致京东云无线宝 WSKEY 失效

订阅通知

订阅执行结果

目前Turbo版本的消息通道支持以下渠道

  • 企业微信应用消息
  • Android
  • Bark iOS
  • 企业微信群机器人
  • 钉钉群机器人
  • 飞书群机器人
  • 自定义微信测试号
  • 方糖服务号
  1. 前往 sct.ftqq.com点击登入,创建账号。
  2. 点击点SendKey ,生成一个 Key。将其增加到 Github Secrets 中,变量名为 SERVERPUSHKEY
  3. 配置消息通道 ,选择方糖服务号,保存即可。
  4. 推送效果展示

旧版推送渠道sc.ftqq.com即将与4月底下线,请前往sct.ftqq.com生成Turbo版本的Key 注意,申请Turbo版Key后请配置消息通道,如果想沿用以前的微信推送方式,选择方糖服务号即可

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

    刚才看到更新重新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.

    opened by kennylee60 13
  • 更新之后 部分账号会出问题

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

    • 只有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

    opened by sxx1314 5
  • 今天推送出现错误

    今天推送出现错误

    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.

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

    推送失败,不懂怎么回事,是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.

    opened by super-si 4
  • 2代设备适配问题

    2代设备适配问题

    第188行, https://github.com/leifengwl/JDRouterPush/blob/3bc74838a1c7099e7484b0b14b2863bf0b27be89/JDRouterPush.py#L188 建议改成: satisfiedTimes = pointInfo.get("satisfiedTimes", '不适用坐享其成计划')

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

    opened by liupeng3425 4
  • 突然不能正常推送了

    突然不能正常推送了

    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.

    opened by 94oiio 3
  • 这几天没推送,看了下报错好多,啥都没改,不知道啥原因

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

    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.

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

    看了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

    opened by xy364515640 3
  • 防止不在线的设备获取不到onlinetime,导致程序一直重新运行

    防止不在线的设备获取不到onlinetime,导致程序一直重新运行

    如果有设备不在线,有的信息获取不到,会导致程序不停重复运行。 有两个想法: 1.获取不到的信息自动填写为占位符字符串,程序不报错,正常发送推送信息 2.设定全局重新运行次数限制,超过次数就停止,发送推送提示设备不在线

    希望大佬能帮忙修改下,非常感谢您的辛勤付出,提供了这么好的工具,不知道能否交换下交流方式方便请教您一些问题?

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

    今早没有推送发现有错误,重新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.

    opened by yemaopiqi 2
  • sever酱推送有问题

    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)

    opened by topdcw 2
  • 运行python JDRouterPush.py返回报错

    运行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) # 设备名称

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

    opened by dalant2019 2