Sitoi / dailycheckin

基于「Docker」/「青龙面板」/「群晖」的每日签到脚本(支持多账号)签到列表: |爱奇艺|全民K歌|有道云笔记|百度贴吧|Bilibili|V2EX|AcFun|什么值得买|阿里云盘|i茅台申购|小米运动|百度搜索资源平台|恩山论坛|奥拉星|
https://sitoi.github.io/dailycheckin/
MIT License
6.69k stars 1.22k forks source link

[Bug] 小米运动,淘宝时间戳获取接口常见异常 #433

Closed FDrag0n closed 1 month ago

FDrag0n commented 2 months ago

💻 系统环境

Other Linux

📦 部署环境

青龙

🐛 问题描述

image

淘宝获取时间戳的地方应该是加了风控,访问常见超时或者拒绝,可以用本地时间戳作备用

参考逻辑 str(int(time.time()) * 1000)

📝 运行日志

HTTPConnectionPool(host='api.m.taobao.com', port=80): Max retries exceeded with url: /rest/api3.do?api=mtop.common.getTimestamp (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff35159cd50>: Failed to establish a new connection: [Errno 111] Connection refused'))

lg469 commented 1 month ago

时间戳可以换这个接口https://acs.m.taobao.com/gw/mtop.common.getTimestamp/

Cuigd commented 1 month ago

怎么换啊

时间戳可以换这个接口https://acs.m.taobao.com/gw/mtop.common.getTimestamp/

FDrag0n commented 1 month ago

怎么换啊

时间戳可以换这个接口https://acs.m.taobao.com/gw/mtop.common.getTimestamp/

https://github.com/Sitoi/dailycheckin/blob/main/dailycheckin/mimotion/main.py#L22

Cuigd commented 1 month ago

怎么换啊

时间戳可以换这个接口https://acs.m.taobao.com/gw/mtop.common.getTimestamp/

https://github.com/Sitoi/dailycheckin/blob/main/dailycheckin/mimotion/main.py#L22

Traceback (most recent call last): File "/ql/data/scripts/Sitoi_dailycheckin/dailycheckin/mimotion/main.swap.py", line 127, in print(MiMotion(check_item=item).main()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ql/data/scripts/Sitoi_dailycheckin/dailycheckin/mimotion/main.swap.py", line 88, in main login_token, userid = self.login(phone, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ql/data/scripts/Sitoi_dailycheckin/dailycheckin/mimotion/main.swap.py", line 51, in login location = r1.headers["Location"]


  File "/usr/local/lib/python3.11/site-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
           ~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'location'
这种怎么解决啊