misaka icon indicating copy to clipboard operation
misaka copied to clipboard

china_telecom.py 电信签到报这个错

Open sxsjs123 opened this issue 3 years ago • 6 comments

Traceback (most recent call last): File "/ql/data/scripts/limoruirui_misaka/china_telecom.py", line 402, in telecom.main() File "/ql/data/scripts/limoruirui_misaka/china_telecom.py", line 361, in main self.share() File "/ql/data/scripts/limoruirui_misaka/china_telecom.py", line 340, in share "userId": self.get_userid(), File "/ql/data/scripts/limoruirui_misaka/china_telecom.py", line 315, in get_userid userid = post(url, json=body).json()["data"]["userInfo"]["userThirdId"] KeyError: 'userInfo'

sxsjs123 avatar Nov 21 '22 08:11 sxsjs123

@sxsjs123 重跑 将315行的post(url, json=body).json() 输出

limoruirui avatar Nov 21 '22 08:11 limoruirui

@limoruirui {'timestamp': '2022-11-21T09:08:34.383+0000', 'status': 400, 'error': 'Bad Request', 'message': '访问可能出错了..', 'path': '/query/sharingGetGold'}

sxsjs123 avatar Nov 21 '22 09:11 sxsjs123

@sxsjs123 加个请求头 post(url, headers=self.headers, json=body).json() 再看看

limoruirui avatar Nov 21 '22 11:11 limoruirui

谢谢在 2022年11月21日,19:24,limo_ruirui @.***> 写道: @sxsjs123 加个请求头 post(url, headers=self.headers, json=body).json() 再看看

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

sxsjs123 avatar Nov 21 '22 12:11 sxsjs123

谢谢在 2022年11月21日,19:24,limo_ruirui @.> 写道: @sxsjs123 加个请求头 post(url, headers=self.headers, json=body).json() 再看看 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

可以么 之前写没注意看请求头忘记加了 也一直没出问题 就没注意到了

limoruirui avatar Nov 21 '22 12:11 limoruirui

大大我暂时没机会尝试,我尝试后回复你。谢谢在 2022年11月21日,20:31,limo_ruirui @.***> 写道:

谢谢在 2022年11月21日,19:24,limo_ruirui @.> 写道: @sxsjs123 加个请求头 post(url, headers=self.headers, json=body).json() 再看看 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

可以么 之前写没注意看请求头忘记加了 也一直没出问题 就没注意到了

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

sxsjs123 avatar Nov 21 '22 12:11 sxsjs123