Sun Aug 27 13:33:51 CST 2017

This commit is contained in:
ddv12138 2017-08-27 13:33:51 +08:00
parent 87991aff93
commit 19e7c45eb9
3 changed files with 3959 additions and 5 deletions

2
cet.txt Normal file
View File

@ -0,0 +1,2 @@
姓名潘猛学校武汉晴川学院考试级别英语四级笔试成绩准考证号420550171103523总分273听力87阅读109写作和翻译77口试成绩准考证号--等级:--
姓名潘猛学校武汉晴川学院考试级别英语四级笔试成绩准考证号420550171103523总分273听力87阅读109写作和翻译77口试成绩准考证号--等级:--

View File

@ -17,7 +17,7 @@ from urllib.parse import quote
from bs4 import BeautifulSoup as bs from bs4 import BeautifulSoup as bs
proxy = { proxy = {
'http':'http://101.200.44.5:8888' 'http':'101.200.44.5:8888'
} }
URL='http://www.chsi.com.cn/cet/' URL='http://www.chsi.com.cn/cet/'
@ -35,7 +35,7 @@ H = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,
def query(id__,name): def query(id__,name):
s = requests.Session() s = requests.Session()
req = s.get(URL,headers=H,proxies=proxy) req = s.get(URL,headers=H)
if req.ok : if req.ok :
url = URL + data.format(id__,quote(name)) url = URL + data.format(id__,quote(name))
@ -85,7 +85,7 @@ else:
print('没有') print('没有')
exit(0)''' exit(0)'''
### testing end ### testing end
names = ['赵昊罡','潘猛'] names = ['赵昊罡']
for num in range(1,11): for num in range(1,11):
for zkzh in [i for i in range(*number)]: for zkzh in [i for i in range(*number)]:
for xm in names: for xm in names:
@ -94,8 +94,7 @@ for num in range(1,11):
result = parse(text) result = parse(text)
print(result) print(result)
append_file(result) append_file(result)
names.pop(xm)
continue continue
else: else:
print(zkzh,xm,sep='-->') print(zkzh,xm,sep='-->')
sleep(60) sleep(0.5)

3953
r.txt Normal file

File diff suppressed because it is too large Load Diff