import requests
import re
cookies = {
'semester.id' : '402',
'JSESSIONID' : '8DAB84F7E3D8C6F7FCF888EC667B11FA',
'GSESSIONID' : '8DAB84F7E3D8C6F7FCF888EC667B11FA'
}
url = 'http://jwgl.cuit.edu.cn/eams/stdElectCourse!batchOperator.action?profileId=2919'
data = {
'operator0':'73833:true:0'
}
code = ['74361','74360']
j = 0
while 1:
if j%100==0:
print('\n第'+str(j)+'轮:')
for i in code:
data = {
'operator0': i+ ':true:0'
}
r = requests.post(url, data=data, cookies=cookies)
text = r.text[3100:3400]
result = re.findall('<div style="width:85%;color:red;text-align:left;margin:auto;">(.*?)</br>', text, re.S)[0]
result = re.findall('\n\t\t\t\t(.*)', result)[0]
if '成功' in result:
print(result+'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++===')
if j%100==0:
print(result)
# print(result)
j+=1
# print(r.text[3100:3400])
python抢课脚本
最新推荐文章于 2022-06-08 13:17:46 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)