""" @Author: 罗申申 @Project: HuelLibraya @Time: 12/29/2018 """ import time from HuelLibrary_Color import Color from HuelLibrary_Welcome import welcome #社会学系同学自行修改,只修改这两处 welcome() clr = Color() clr.print_green_text_end("请输入你的微信ID:") id = input() clr.print_green_text_end("请输入你的座位纵坐标:") x = input() clr.print_green_text_end("请输入你的座位横坐标:") y = input() def get_wechat(g_id): if g_id == "": clr = Color() clr.print_red_text("非法ID,程序退出!!!") return get_wechat(id) Seat_info = { 'X': int(x),
for i in Verification_Code[len(Verification_Code) // 2 + 1:]: try: book(url + i + '=' + '{},{}'.format(x, y) + '&yzm=') except Exception: break result_str = cd_index(library_index) if result_str == 'Error': clr = Color() clr.print_red_text("登录失败,退出程序,原因:错误程度严重,配置出错!!!!!!") clr.print_red_text("程序在 10 秒之后退出,重新检查再试!") time.sleep(10) pass else: clr = Color() clr.print_green_text_end( "输入 '0' 立即选座 <--------------------------> 输入 '1' 明天预选座:") select = input() if select == '0': code = get_code() while True: if int(code) in floor_list: break else: clr = Color() clr.print_red_text("严重警告:输入不合法,请继续重新输入!或者退出系统!\n") code = input() result_list = get_now_floor(code) cd_floor(result_list[0], code) url = library_now + str(result_list[1]) + '&' x = Seat_info.get("X") y = Seat_info.get("Y")