Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

桃叭4月13日更新接口,请求join得到的是最新的订单信息而非每个用户的集资总额榜,可以修改逻辑减少请求次数 #2

Open
MowChann opened this issue Apr 14, 2020 · 3 comments

Comments

@MowChann
Copy link

https://github.com/41xu/SNH48-Group-s-QQ-bot/blob/23fd64457e48700b6434c7e92183a0536b7f8c7d/taoba/taoba.py#L105-L117

@41xu
Copy link
Owner

41xu commented Apr 14, 2020

got it! thx! (:D

@fixablecar
Copy link

for x in response: dic[x['userid']] = [x['id'], float(x['money']), x['nick'], x['stime']]

一个userid可以有多个订单,你这样写的话,较新的订单会一直被旧订单覆盖
这里id是订单的id,不会重覆,所以你可以写成
for x in response: dic[x['id']] = [x['userid'], float(x['money']), x['nick'], x['stime']]

@41xu
Copy link
Owner

41xu commented Jul 15, 2020

for x in response: dic[x['userid']] = [x['id'], float(x['money']), x['nick'], x['stime']]

一个用户id可以有多个订单,你这样写的话,较新的订单会一直被旧订单覆盖
这里id是订单的id,不会重覆,所以你可以写成
for x in response: dic[x['id']] = [x['userid'], float(x['money']), x['nick'], x['stime']]

你好,我写的时候桃叭response内容还没更新,4.13之后更新了response接口(这个issue上面的回复内容就在讲这个问题)
不过我写完了就没对这个脚本进行维护和更新,也没更新的必要Orz,那麻烦您改一下吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants