大学生在线四史脚本

大学生在线四史脚本中国大学生在线脚本无python环境(博主推荐)使用教程软件下载有Python环境编译环境源码分享无python环境(博主推荐)使用教程无Python环境下载可执行文件,将题库.csv与main.exe置于同一文件夹,直接运行即可.uid获取方式:关注公众号:云享科技毒瘤,在菜单栏【四史学习】–>【uid获取】–>【阅读全文】即可查看自己的uid。软件下载公众号:云享科技毒瘤长按二维码关注我们,查看历史文章即可下载声明:1.云享科技毒瘤提供的所有下载文件均在网络收集,请于

大家好,又见面了,我是你们的朋友全栈君。

无python环境(博主推荐)

使用教程

无Python环境 下载可执行文件,将题库.csv与main.exe置于同一文件夹,直接运行即可.
uid获取方式:关注公众号:云享科技毒瘤,在菜单栏【 四史学习】–>【uid获取】–>【阅读全文】即可查看自己的uid。

软件下载

公众号:云享科技毒瘤
长按二维码关注我们,查看历史文章即可下载

在这里插入图片描述

声明:
1.云享科技毒瘤提供的所有下载文件均在网络收集,请于下载后的24小时内删除。如需体验更多乐趣,请支持正版。
2、我们提供用户下载的所有内容均来自互联网。如有内容侵犯您的版权或其他利益的,请编辑邮件并加以说明发送到我们的邮箱2229725883@qq.com。我们会在收到消息后24小时内处理。

有Python环境

编译环境

一、编译环境:Python 3.0
二、依赖库
本项目依赖的第三方库:

requests

在终端执行以下语句安装依赖即可:

pip install requests

使用方法
运行后直接输入token或uid即可,程序会自动识别。
⚠️ ️注意:
️输入token为Bearer后面那一串英文,一定要复制完全!
有Python环境
将题库.csv与main.py放于同一目录下,直接运行main.py文件即可.

无Python环境 下载可执行文件,将题库.csv与main.exe置于同一文件夹,直接运行即可.

源码分享

main.py

import requests,csv,re,json,random,time
mode_id_list = [
{ 
"id": "5f71e934bcdbf3a8c3ba51d5", "name": "英雄篇"},
{ 
"id": "5f71e934bcdbf3a8c3ba51d6", "name": "复兴篇"},
{ 
"id": "5f71e934bcdbf3a8c3ba51d7", "name": "创新篇"},
{ 
"id": "5f71e934bcdbf3a8c3ba51d8", "name": "信念篇"},
]
#篇文id
Mode_id = '5f71e934bcdbf3a8c3ba51d5'
#篇文名字
name = '英雄篇'
#记录刷的积分
Integrals = 0
#获取选择的四史篇目
def GetMode_id(type = 8):
global Mode_id
global name
if type == 1:
json = mode_id_list[type-1]
elif type == 2:
json = mode_id_list[type-1]
elif type == 3:
json = mode_id_list[type-1]
elif type == 4:
json = mode_id_list[type-1]
else:
json = mode_id_list[random.randint(0,3)]
Mode_id = json["id"]
name = json["name"]
#print(Mode_id)
#print(name)
#return json
#获取个人信息
def GetInfo():
import requests
url = "https://ssxx.univs.cn/cgi-bin/race/grade/?t=1612856369&activity_id=5f71e934bcdbf3a8c3ba5061"
payload = { 
}
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s' % (token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a; _gat=1'
}
#设置代理ip
#proxies = {'http': '120.236.128.201:8060','https': '120.236.128.201:8060'}
#proxies = random.choice(proxies)
#print("选择的代理ip为%s"%(proxies))
#response = requests.request("GET", url, proxies=proxies, headers=headers, data=payload)
response = requests.request("GET", url, headers=headers, data=payload)
return response.json()
#获取登录二维码 -已失效
def ViewQR(url=''):
html = requests.get(url)
with open('QR.png', 'wb') as file:
file.write(html.content)
import platform
userPlatform=platform.system()						# 获取操作系统
fileDir='QR.png'
if userPlatform == 'Darwin':								# Mac
import subprocess
subprocess.call(['open', fileDir])
elif userPlatform == 'Linux':								# Linux
import subprocess
subprocess.call(['xdg-open', fileDir])
else:																# Windows
import os
os.startfile(fileDir)
#读取题库
def ReadFile():
with open("题库.csv", "r",encoding='UTF-8') as f:
reader = csv.reader(f)
db = []
for row in list(reader):
db.append(row)
return db
#写入题库
def IntoFile(FileNmae = '题库.csv',Data=[]):
file = open(FileNmae, 'a', encoding='utf-8',newline='')
f = csv.writer(file)
f.writerow(
Data
)
print('已写入%s文件:'%(FileNmae),Data)
file.close()
#获取题目
def GetQuestions(activity_id='5f71e934bcdbf3a8c3ba5061'):
global Mode_id
url = "https://ssxx.univs.cn/cgi-bin/race/beginning/?t=1612247769&activity_id=%s&mode_id=%s&way=1"%(activity_id,Mode_id)
payload = { 
}
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a; _gat=1'
}
response = requests.request("GET", url, headers=headers, data=payload)
# print('获取题目:',response.json())
question_ids = response.json()['question_ids']
num = 0
SucessNum = 0
FailNum = 0
for i in range(len(question_ids)):
num += 1
if i == 10:
if CheckVerification():
print("验证码已通过")
else:
SubmitVerification()
print("验证码状态:", CheckVerification())
if GetOption(activity_id=activity_id,question_id=question_ids[i]):
SucessNum += 1
else:
FailNum += 1
race_code = response.json()['race_code']
Finsh(race_code)
print('此次成功查询%s个题,收录%s个题'%(SucessNum,FailNum))
#获取选项
def GetOption(activity_id='5f71e934bcdbf3a8c3ba5061',question_id='5f17ef305d6fe02504ba5e17'):
global Mode_id
url = "https://ssxx.univs.cn/cgi-bin/race/question/?t=1612247250&activity_id=%s&question_id=%s&mode_id=%s&way=1"%(activity_id,question_id,Mode_id)
payload = { 
}
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a'
}
response = requests.request("GET", url, headers=headers, data=payload)
# print('获取选项:',response.json())
options = response.json()['data']['options']
#选项
result = { 
}
for i in options:
title = i['title']
replace1 = re.findall('<.*?>', title)
for j in range(len(replace1)):
if 'display:none;' in replace1[j] or 'display: none;' in replace1[j]:
replace2 = re.findall('%s.*?%s' % (replace1[j], replace1[j + 1]), title)
title = str(title).replace(replace2[0], '')
for j in replace1:
title = str(title).replace(j, '')
result[title] = i['id']
# print(result)
#题目
title = response.json()['data']['title']
replace1 = re.findall('<.*?>',title)
for i in range(len(replace1)):
if 'display:none;' in replace1[i] or 'display: none;' in replace1[i]:
replace2 = re.findall('%s.*?%s'%(replace1[i],replace1[i+1]),title)
title = str(title).replace(replace2[0],'')
for i in replace1:
title = str(title).replace(i,'')
# print(title)
'''判断题目是否已在题库中'''
db = ReadFile()
for i in db:
if not i:
continue
#在题库中
if title in i[0]:
print('在题库中已搜索到答案: %s - %s'%(i[0],i[1]))
answer = []
for j,k in result.items():
if j in i[1]:
answer.append(k)
#提交答案
Confire(question_id=question_id,answer=answer)
return 'Sucess'
#题库中没有
print('未在题库中搜索到答案,执行捕获题目模式...')
results = SreachResult(question_id=question_id, answer=response.json()['data']['options'][0]['id'])
TrueResult = []
for i in results:
for j,k in result.items():
if i == k:
TrueResult.append(j)
num = 0
for i in db:
if title in i:
num += 1
break
if not num:
IntoFile(FileNmae = '题库.csv',Data=[title,TrueResult])
else:
print('已存在题库中: ',title[0],TrueResult)
#从题库中搜素答案
def SreachResult(question_id='5f17ef305d6fe02504ba5e17',answer='5f75fe348e6c9f85d1b6072a',activity_id='5f71e934bcdbf3a8c3ba5061'):
global Mode_id
url = "https://ssxx.univs.cn/cgi-bin/race/answer/"
payload = "{\"activity_id\":\"%s\",\"question_id\":\"%s\",\"answer\":[\"%s\"],\"mode_id\":\"%s\",\"way\":\"1\"}"%(activity_id,question_id,answer,Mode_id)
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'content-type': 'application/json;charset=UTF-8',
'origin': 'https://ssxx.univs.cn',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a'
}
#答题完成一次休眠时间
#time.sleep(random.uniform(0.1,0.3))#0.1 0.3
response = requests.request("POST", url, headers=headers, data=payload)
data = response.json()
# print('提交选项:',data)
return response.json()['data']['correct_ids']
#提交题目选项
def Confire(question_id='5f17ef305d6fe02504ba5e17',answer=['5f75fe348e6c9f85d1b6072a'],activity_id='5f71e934bcdbf3a8c3ba5061'):
global Mode_id
url = "https://ssxx.univs.cn/cgi-bin/race/answer/"
payload = '{"activity_id":"%s","question_id":"%s","answer":%s,"mode_id":"%s","way":"1"}'%(activity_id,question_id,json.dumps(answer),Mode_id)
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'content-type': 'application/json;charset=UTF-8',
'origin': 'https://ssxx.univs.cn',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a'
}
#答题完成一次休眠时间
#time.sleep(random.uniform(0.1,0.3))#0.1 0.3
response = requests.request("POST", url, headers=headers, data=payload)
data = response.json()
# print('提交选项:', data)
# print(data)
return response.json()['data']['correct_ids']
#提交整个试题
def Finsh(race_code='6018f697224c6a1526204144'):
url = "https://ssxx.univs.cn/cgi-bin/race/finish/"
payload = "{\"race_code\":\"%s\"}"%(race_code)
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'content-type': 'application/json;charset=UTF-8',
'origin': 'https://ssxx.univs.cn',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a'
}
response = requests.request("POST", url, headers=headers, data=payload)
# print('提交:',response.json())
if response.json()['code'] == 4823:
SubmitVerification()
Finsh(race_code)
# print(response.json())
try:
print('已提交,正确数:%s 用时:%ss'%(response.json()['data']['owner']['correct_amount'],response.json()['data']['owner']['consume_time']))
global Integrals
Integrals = int(response.json()['data']['owner']['correct_amount'])
except:
print(response.json())
#PK10 -已废弃,暂不更新
def PK10(activity_id='5f71e934bcdbf3a8c3ba5061',mode_id='5f71e934bcdbf3a8c3ba51da'):
import requests
url = "https://ssxx.univs.cn/cgi-bin/race/beginning/?t=1612260314&activity_id=%s&mode_id=%s&way=1"%(activity_id,mode_id)
payload = { 
}
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s'%(token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/3/1/5f71e934bcdbf3a8c3ba51da',
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=09fcb686b72bcf8a19fb9f044a5a52d5; _gat=1'
}
response = requests.request("GET", url, headers=headers, data=payload)
# print(response.json())
question_ids = response.json()['question_ids']
num = 0
SucessNum = 0
FailNum = 0
for i in question_ids:
num += 1
if GetOption(activity_id=activity_id, question_id=i, mode_id=mode_id):
SucessNum += 1
else:
FailNum += 1
race_code = response.json()['race_code']
Finsh(race_code)
print('此次成功查询%s个题,收录%s个题' % (SucessNum, FailNum))
#登录函数 -已失效
def Login():
print('正在获取登陆二维码...')
Random = ''.join(random.sample('qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890',random.randrange(5,10)))
url = 'https://oauth.u.hep.com.cn/oauth/wxapp/qrcode/5f582dd3683c2e0ae3aaacee?random=%s&useSelfWxapp=true&enableFetchPhone=false'%(Random)
a = requests.get(url)
print("请用微信扫描二维码登陆...")
ViewQR(a.json()['data']['qrcode'])
print('\r正在等待扫描二维码...',end='\r')
time.sleep(3)
TimeNum = 1
while True:
print('\r正在等待扫描二维码,已等待%ss...'%(TimeNum),end='')
a = requests.post('https://oauth.u.hep.com.cn/oauth/wxapp/confirm/qr?random=%s&useSelfWxapp=true'%(Random))
if a.json()['data']['code'] == 200:
_id = a.json()['data']['data']['_id']
print('\n欢迎你,%s'%(a.json()['data']['data']['username']))
GetToken(uid=_id)
break
time.sleep(1)
print('\r',end='')
TimeNum += 1
#获取token
def GetToken(uid='6018e5d37fc77f3d90194078'):
url = 'https://ssxx.univs.cn/cgi-bin/authorize/token/?t=1612276118&uid=%s'%(uid)
a = requests.get(url=url)
global token
token = a.json()['token']
# print(token)
return token
#检查验证信息
def CheckVerification():
global  Mode_id
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s' % (token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a; _gat=1'
}
code = "E5ZKeoD8xezW4TVEn20JVHPFVJkBIfPg+zvMGW+kx1s29cUNFfNka1+1Fr7lUWsyUQhjiZXHDcUhbOYJLK4rS5MflFUvwSwd1B+1kul06t1z9x0mfxQZYggbnrJe3PKEk4etwG/rm3s3FFJd/EbFSdanfslt41aULzJzSIJ/HWI="
submit_data = { 

"activity_id": "5f71e934bcdbf3a8c3ba5061",
"mode_id": Mode_id,
"way": "1",
"code": code
}
url = "https://ssxx.univs.cn/cgi-bin/check/verification/code/"
response = requests.post(url, json=submit_data, headers=headers)
result = json.loads(response.text)
# print(result)
return result["status"]
#提交验证
def SubmitVerification():
global Mode_id
headers = { 

'authority': 'ssxx.univs.cn',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json, text/plain, */*',
'authorization': 'Bearer %s' % (token),
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://ssxx.univs.cn/client/exam/5f71e934bcdbf3a8c3ba5061/1/1/%s'%(Mode_id),
'accept-language': 'zh,en;q=0.9,zh-CN;q=0.8',
'cookie': '_ga=GA1.2.79005828.1612243540; _gid=GA1.2.1602430105.1612243540; tgw_l7_route=be2f17e6fbcb3e6c5202ac57e388ad5a; _gat=1'
}
code = "HD1bhUGI4d/FhRfIX4m972tZ0g3jRHIwH23ajyre9m1Jxyw4CQ1bMKeIG5T/voFOsKLmnazWkPe6yBbr+juVcMkPwqyafu4JCDePPsVEbVSjLt8OsiMgjloG1fPKANShQCHAX6BwpK33pEe8jSx55l3Ruz/HfcSjDLEHCATdKs4="
submit_data = { 

"activity_id": "5f71e934bcdbf3a8c3ba5061",
"mode_id": Mode_id,
"way": "1",
"code": code
}
url = "https://ssxx.univs.cn/cgi-bin/save/verification/code/"
response = requests.post(url, json=submit_data, headers=headers)
result = response.json()
# print(result)
# if result["code"] != 0:
# pass
# raise MyError(result["code"], "提交验证码失败:" + str(result))
# return result["status"]
# token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTU4MjU3ODgsImlhdCI6MTYxNTgxNDk4OCwiaXNzIjoiSEVQRTM6QVVUSCIsIm5iZiI6MTYxNTgxNDk4OCwidWlkIjoiNjAxOTQyNjhkMGI2MGI1Nzg4MWU5MjJjIiwibmFtZSI6Ilx1N2M3M1x1OWE2Y1x1Njc5NyIsImNvZGUiOiI2MDE5NDI2OGQwYjYwYjU3ODgxZTkyMmMiLCJpc19wZXJmZWN0Ijp0cnVlfQ.7ehyVRuorstSzZBzAE7Imdgoa_gVmDAS31Wj90l24eI'
loginInfo = input('请输入uid或者token「不含Bearer,即后面那一串内容.」\n输入完成后回车:')
judge = True
GetMode_id()
if len(loginInfo) > 200:
print('已更新token,正在获取信息...')
token = loginInfo
else:
uid = loginInfo
print('正在获取token,请稍后...')
try:
token = GetToken(uid=uid)
except:
judge = False
print('uid输入有误或网络问题...')
print('token已更新...')
info = GetInfo()
try:
info = GetInfo()['data']
except:
judge = False
print('输入token有误或登录已过期...')
if judge:
print('欢迎你,来自%s的%s,当前积分:%s'%(info['university_name'],info['name'],info['integral']))
print('自动选择------------>8\n'+'英雄篇---------->1\n'+'复兴篇---------->2\n'+'创新篇---------->3\n'+'信念篇---------->4')
type = int(input("请选择模式: "))
EndNum = int(input("请输入需要刷的积分: "))
num = 0
IntegralSum = 0
#while num < EndNum:
while IntegralSum <= EndNum:
GetMode_id(type)
info = GetInfo()['data']
print('当前答题篇目:',name)
print('当前积分:',info['integral'])
num += 1
print('\n正在第%s次刷题~,已刷%s积分'%(num,IntegralSum))
GetQuestions()
IntegralSum += Integrals
info = GetInfo()['data']
print('\n感谢使用!来自%s的%s,当前积分:%s,本次刷题积分为:%s'%(info['university_name'],info['name'],info['integral'],IntegralSum))
input('感谢使用,回车退出程序:)')

2、题录.csv
下载

密码:关注公众号后台回复:四史脚本密码

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/147533.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • 【系统架构设计师】第一章:操作系统(1.1.1—1.1.2)操作系统的分类和结构

    【系统架构设计师】第一章:操作系统(1.1.1—1.1.2)操作系统的分类和结构好久不见了。最近由于忙着期末考试,所以一直没更新帖子,最近考完了,我又回来了。很久不动笔了,突然很手痒,但是又一直在纠结写什么。原计划要写kali的从零开始的教程,不过仔细想想其实那个并没有系统架构师的专注力大,因为这个是我的一个目前的目标。你们知道的,我今年大二,下个学期会特别忙,有七八场ctf和awd,线上线下的都有,这就意味着我基本整个学期的一半都要在外地跑。更别说还有实习,招警考试…想想就头疼。不过好在我学计算机还是比较有天赋的,所以专业课反而是最轻松的一个。但是,我的想法不仅仅只是课程.

  • loadrunner 测试 html5,Loadrunner压力测试工具使用教程

    loadrunner 测试 html5,Loadrunner压力测试工具使用教程loadrunner是一款基于项目的简化版性能负载测试基金方案,帮助用户快速识别程序的异常行为。loadrunner的兼容性很强大,支持Web/移动、Web服务、MQTT、HTML5等等,有效减少了脚本编制的时间。由于这款软件功能强大、可操作范围极广,所有今天小编特地带来了loadrunner的部分使用教程。1.1loadrunner压力测试原理本质就是在loadrunner上模拟多个用户同时按固…

  • java%f什么意思_浅析Java中print、printf、println的区别「建议收藏」

    java%f什么意思_浅析Java中print、printf、println的区别「建议收藏」printf主要是继承了C语言的printf的一些特性,可以进行格式化输出print就是一般的标准输出,但是不换行println和print基本没什么差别,就是最后会换行System.out.printf(“thenumberis:d”,t);参照JAVAAPI的定义如下:’d’整数结果被格式化为十进制整数’o’整数结果被格式化为八进制整数’x’,’X’整数结果被格式化为十六…

  • html中超链接使用_HTML超链接代码

    html中超链接使用_HTML超链接代码展开全部html超链接的写法是e69da5e6ba903231313335323631343130323136353331333431353431使用a标签,如:百度一下,你就知道。在html中,a标签中的a(或者A)是anchor的缩写。anchor的基本解释是锚,这些标签的作用是标明超连接的起始位置或目的位置。标签可定义锚,通过使用href属性。创建指向另外一个文档的链接(或超…

  • 【机器学习】数据归一化——MinMaxScaler理解

    【机器学习】数据归一化——MinMaxScaler理解文章目录前言公式实例前言前阵在查sklearn的归一化方法MinMaxScaler的时候,发现找到的文章解释的一塌糊涂,一般都是扔个公式加一堆代码就敷衍了事了,所以这次写一篇讲述MinMaxScaler核心功能的文章。公式会查MinMaxScaler的基本上都应该理解数据归一化,本质上是将数据点映射到了[0,1]区间(默认),但实际使用的的时候也不一定是到[0,1],你也可以指定参数feature_range,映射到其他区间,这个后面再讲。首先了解该计算公式:Xstd=X−X.min(axis

    2022年10月11日
  • C# TransactionScope「建议收藏」

    C# TransactionScope「建议收藏」TransactionScopeTransactionScope事务处理经常用到,老是用了又忘,做点记录。TransactionScope的定义跟使用介绍。TransactionScopeOptionTransactionScopeOption枚举型用来决定一个TransactionScope是用已有的事务,还是定义TransactionScope的新做一个事务,还是完全不用事务。默认是Required,Required表示如果已有事务,就加入该事务,否则新建一个事务。TransactionOp

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号