Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EasyTicket/bin/get_train_code_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def time_out_check(self):
def ensure_ticket_info(self):
self.passengers_name_read=None
self.give_ticket_info_xpath=r"/html/body/div[1]/div[11]/div[5]/a[2]"
self.ticket_sure_xpath=r"/html/body/div[5]/div/div[5]/div[1]/div/div[2]/div[2]/div[8]/a[2]"
self.ticket_sure_xpath=r"/html/body/div[5]/div/div[5]/div[1]/div/div[2]/div[2]/div[7]/a[2]" # /html/body/div[5]/div/div[5]/div[1]/div/div[2]/div[2]/div[8]/a[2]
self.tip_sure_xpath=r"/html/body/div[4]/div[2]/div[2]/div[2]/a"
self.ticket_get_succeess_xpath=r"/html/body/div[1]/div[2]/div[1]/div/h3/span"
self.passengers_name_file=os.path.join(self.temp_dir, "data_socket_buyer_name_info.log")
Expand Down
25 changes: 12 additions & 13 deletions src/EasyTicket/bin/get_valid_code_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ def __init__(self, computer_info_width, computer_info_height, file_dir, phone_nu
self.x_entry = 50
self.y_entry = 80 / 3
self.windows_get_valid_code = tkinter.Toplevel()
# self.windows_get_valid_code = tkinter.Tk()
# self.windows_choose_start_time_icon = self.windows_choose_start_time.iconbitmap(
# r"./ticket_12306_prog_addition/download_photo.ico")
self.title_1 = self.windows_get_valid_code.title("填写登录信息")
self.windows_get_valid_code_height = 300
self.windows_get_valid_code_width = 500
Expand Down Expand Up @@ -50,13 +47,15 @@ def time_count_bind(self):
self.count_total_run+=1
def time_count_down():
self.time_count_total=60
# if self.is_window_destory == False:
while self.time_count_total!=0 and self.is_window_destory==False:
self.time_text=tkinter.Label(self.windows_get_valid_code, text="重新发送({}秒)".format(self.time_count_total))
self.time_text.place(x=self.x_entry, y=self.y_entry+60)
self.time_count_total-=1
time.sleep(1)
self.time_text.destroy()
try:
self.time_text=tkinter.Label(self.windows_get_valid_code, text="重新发送({}秒)".format(self.time_count_total))
self.time_text.place(x=self.x_entry, y=self.y_entry+60)
self.time_count_total-=1
time.sleep(1)
self.time_text.destroy()
except:
pass
try:
self.button_resend_valid_code = tkinter.Button(
self.windows_get_valid_code, text="重新发送验证码", width=24, height=1,
Expand All @@ -73,7 +72,10 @@ def time_count_down_thread():
with open(os.path.join(self.temp_dir, "data_socket_user_resend_valid_code_info.log"),
"w", encoding="utf-8") as datalog_write:
datalog_write.write(str(1))
time_count_down_thread()
try:
time_count_down_thread()
except:
pass
if self.count_total_run!=1:
self.button_resend_valid_code.destroy()
def get_data(self):
Expand All @@ -95,9 +97,6 @@ def button_get_sign_in_info(self):
self.button_sign_in_sure.pack(side=tkinter.BOTTOM)
self.bind_func_sure = self.button_sign_in_sure.bind("<Button-1>", lambda event: self.get_data())

# if __name__=="__main__":
# get_valid_code(2560, 1600, r"D:\project\python\pythonProject1\Web_Crawler\Analyze_Number\Numers_Analyze_Beta\Analyze_number_mainfile\ticket_12306", "15955152788")
# tkinter.mainloop()



Expand Down