Exemplo n.º 1
0
	def main(self):#,xq,time
		count = 0
		for i in self.js_list_101: 
			while True:         
				if count%10 == 0:
					opener = self.get_img_code()
					for j in range(30):
						imgcodeidentify.deal_img("imgCode.jpg")
						imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg")
						imgcodeidentify.interference_point(imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg"),"imgCode.jpg")
						try:
							code = self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
						except IndexError:
							continue
	                #self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
						code = code.replace(" ","")
						print(code)

		                # input("ÇëÊäÈëÑéÖ¤Âë\n")
						try:
							html = self.post_data(opener,"20171","1",code,"1","101",i)
						except IndexError:
							continue
						else:
							self.deal_table(html)
							temp_list = self.recommend_class()
							temp_dict = {}
							temp_dict[str(i)] = temp_list
							self.final_list.append(temp_dict)
						# print("Àí¿ÆÂ¥"+str(i)+"½ÌÊÒ²éѯÍê±Ï")
						count = count + 1
						break
Exemplo n.º 2
0
	def main(self):#,xq,time
		count = 0
		for i in self.js_list_101: 
			while True:         
				if count%10 == 0:
					opener = self.get_img_code()
					for j in range(30):
						imgcodeidentify.deal_img("imgCode.jpg")
						imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg")
						imgcodeidentify.interference_point(imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg"),"imgCode.jpg")
						try:
							code = self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
						except IndexError:
							continue
	                #self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
						code = code.replace(" ","")
						print(code)

		                # input("ÇëÊäÈëÑéÖ¤Âë\n")
						try:
							html = self.post_data(opener,"20171","1",code,"1","101",i)
						except IndexError:
							continue
						else:
							self.deal_table(html)
							temp_list = self.recommend_class()
							temp_dict = {}
							temp_dict[str(i)] = temp_list
							self.final_list.append(temp_dict)
						# print("Àí¿ÆÂ¥"+str(i)+"½ÌÊÒ²éѯÍê±Ï")
						count = count + 1
						break
Exemplo n.º 3
0
def get_code():

    APP_ID = '11519354'
    API_KEY = 'tLlZhgC4kwx8ArqEhBXzCvRw'
    SECRET_KEY = 'GnpZ0XXBFgZXz8v0aYTGIMhHRMmlRKSd'
    client = AipOcr(APP_ID, API_KEY, SECRET_KEY)

    print("[*]:正在处理验证码图片")
    code = ""
    for j in range(30):
        imgcodeidentify.deal_img("imgCode.jpg")
        imgcodeidentify.interference_line(
            imgcodeidentify.deal_img("imgCode.jpg"), "imgCode.jpg")
        imgcodeidentify.interference_point(
            imgcodeidentify.interference_line(
                imgcodeidentify.deal_img("imgCode.jpg"), "imgCode.jpg"),
            "imgCode.jpg")
    try:
        print("[*]:正在识别验证码")
        code = client.basicGeneral(
            get_img_content("imgCode.jpg"))["words_result"][0]["words"]
        code = re.findall('[a-zA-Z0-9]*', code)[0]
        print("[*]:已经得到验证码" + code)
    except:
        pass
    return code
Exemplo n.º 4
0
							temp_dict = {}
							temp_dict[str(i)] = temp_list
							self.final_list.append(temp_dict)
						# print("Àí¿ÆÂ¥"+str(i)+"½ÌÊÒ²éѯÍê±Ï")
						count = count + 1
						break




sfs = sxufreesite()
sfs.get_img_code()
for j in range(30):
	imgcodeidentify.deal_img("imgCode.jpg")
	imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg")
	imgcodeidentify.interference_point(imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg"),"imgCode.jpg")
code = input("code:")
# code = sfs.client.basicGeneral(sfs.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
#self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
# code = code.replace(" ","")
print(code)
opener = sfs.get_score(sfs.opener,"你的学号","你的密码",code)
print(sfs.cookie)
sfs.post_score(sfs.opener)




# sfs.get_score()
# sfs.main()
# print(sfs.final_list)
Exemplo n.º 5
0
							temp_dict = {}
							temp_dict[str(i)] = temp_list
							self.final_list.append(temp_dict)
						# print("Àí¿ÆÂ¥"+str(i)+"½ÌÊÒ²éѯÍê±Ï")
						count = count + 1
						break




sfs = sxufreesite()
sfs.get_img_code()
for j in range(30):
	imgcodeidentify.deal_img("imgCode.jpg")
	imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg")
	imgcodeidentify.interference_point(imgcodeidentify.interference_line(imgcodeidentify.deal_img("imgCode.jpg"),"imgCode.jpg"),"imgCode.jpg")
code = input("code:")
# code = sfs.client.basicGeneral(sfs.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
#self.client.basicGeneral(self.get_file_content("imgCode.jpg"))["words_result"][0]["words"]
# code = code.replace(" ","")
print(code)
opener = sfs.get_score(sfs.opener,"201701003091","326824",code)
print(sfs.cookie)
sfs.post_score(sfs.opener)




# sfs.get_score()
# sfs.main()
# print(sfs.final_list)