mirror of
https://github.com/teddysun/across.git
synced 2025-04-23 04:19:31 +08:00
2017年 08月 24日 星期四 23:54:09 CST
This commit is contained in:
parent
3438b3fe86
commit
b959b9ac3c
1
cet.txt
Normal file
1
cet.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
姓名:张旭学校:武汉晴川学院考试级别:英语四级笔试成绩准考证号:420550171103516总分:280听力:114阅读:88写作和翻译:78口试成绩准考证号:--等级:--
|
19
cet_query.py
19
cet_query.py
@ -50,7 +50,7 @@ def check(html):
|
|||||||
return False
|
return False
|
||||||
elif soup.find('div',{"class":"error alignC"}):
|
elif soup.find('div',{"class":"error alignC"}):
|
||||||
print("缺少验证码")
|
print("缺少验证码")
|
||||||
return True
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -71,27 +71,26 @@ def append_file(string):
|
|||||||
with open('cet.txt','a+') as f:
|
with open('cet.txt','a+') as f:
|
||||||
f.writelines(string + os.linesep)
|
f.writelines(string + os.linesep)
|
||||||
|
|
||||||
number = 420550171103500,420550171103700 ### 420550171103524 贺深
|
number = 420550171103500,420550171103599 ### 420550171103524 贺深
|
||||||
|
|
||||||
|
|
||||||
### testing
|
### testing
|
||||||
text = query(420550171103524,'贺深')
|
'''text = query(420550171103524,'贺深')
|
||||||
if check(text):
|
if check(text):
|
||||||
print(parse(text))
|
print(parse(text))
|
||||||
else:
|
else:
|
||||||
print('没有')
|
print('没有')
|
||||||
exit(0)
|
exit(0)'''
|
||||||
### testing end
|
### testing end
|
||||||
'''names = ['贺深','张旭','尘飞杨']
|
names = ['贺深','张旭','陈飞扬','赵昊罡','潘猛']
|
||||||
|
for num in range(1,11):
|
||||||
for xm in names:
|
for xm in names:
|
||||||
for zkzh in [ i for i in range(*number) ]:
|
for zkzh in [ i for i in range(*number) ]:
|
||||||
sleep(0.5)
|
|
||||||
text = query(zkzh,xm)
|
text = query(zkzh,xm)
|
||||||
if check(text):
|
if check(text):
|
||||||
result = parse(text)
|
result = parse(text)
|
||||||
print(result)
|
print(result)
|
||||||
append_file(result)
|
append_file(result)
|
||||||
else:
|
else:
|
||||||
print(zkzh,xm,sep='-->')'''
|
print(zkzh,xm,sep='-->')
|
||||||
|
sleep(30)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user