Skip to content

Commit

Permalink
修复获取分数排序混乱的问题
Browse files Browse the repository at this point in the history
修复获取分数排序混乱的问题
  • Loading branch information
thinkrecord authored Sep 8, 2020
2 parents c6a6972 + 00d34f7 commit f170760
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions SourcePackages/pdlearn/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ def get_score(cookies):
total = requests.get("https://pc-api.xuexi.cn/open/api/score/get", cookies=jar,
headers={'Cache-Control': 'no-cache'}).content.decode("utf8")
total = int(json.loads(total, encoding="utf8")["data"]["score"])
each = requests.get("https://pc-api.xuexi.cn/open/api/score/today/queryrate", cookies=jar,
each1 = requests.get("https://pc-api.xuexi.cn/open/api/score/today/queryrate", cookies=jar,
headers={'Cache-Control': 'no-cache'}).content.decode(
"utf8")
each = json.loads(each, encoding="utf8")["data"]["dayScoreDtos"]
each = [int(i["currentScore"]) for i in each if i["ruleId"] in [1, 2, 9, 1002, 1003, 6, 5, 4]]
each1 = json.loads(each1, encoding="utf8")["data"]["dayScoreDtos"]
each1 = [int(i["currentScore"]) for i in each1 if i["ruleId"] in [1, 2, 9, 1002, 1003,6, 5, 4]]
each = [0,0,0,0,0,0,0,0]
each[0]=each1[0]
each[1]=each1[1]
each[2]=each1[5]
each[3]=each1[6]
each[4]=each1[7]
each[5]=each1[4]
each[6]=each1[3]
each[7]=each1[2]
print(each)
return total, each
except:
print("=" * 120)
Expand Down
2 changes: 1 addition & 1 deletion SourcePackages/pdlearn/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def up_info():
print("\n正在联网获取更新信息...")
__Version = "v20200814"
__Version = "v20200908"
__INFO = "TechXueXi最新下载地址为 https://github.com/TechXueXi/TechXueXi"
try:
updata_log = requests.get(
Expand Down

0 comments on commit f170760

Please sign in to comment.