python实现定时抢课脚本
发布时间:2025/08/18 12:17 来源:邗江家居装修网
== -1: while True: location = pyautogui.locateCenterOnScreen(img_name,confidence=0.9) if location is not None: pyautogui.click(location.x, location.y, clicks=click_times, duration=0.2, interval=0.2) elif retry_times> 1: i = 1 while i < retry_times + 1: location = pyautogui.locateCenterOnScreen(img_name,confidence=0.9) if location is not None: pyautogui.click(location.x, location.y, clicks=click_times, duration=0.2, interval=0.2) print("以此类推{}第{}次".format(img_name, i)) i = i + 1def WorkFunction1(sheet): i = 1 while i < sheet.nrows: cmd_type = sheet.cell_value(i, 1) if cmd_type == 1.0: img_name = sheet.cell_value(i, 2) retry_times = 1 if sheet.cell_type(i, 3) == 2 and sheet.cell_value(i, 3) != 0: retry_times = sheet.cell_value(i, 3) Mouse(1, img_name, retry_times) print("浏览左键:{} Done".format(img_name)) elif cmd_type == 2.0: string = sheet.cell_value(i, 2) pyperclip.copy(string) pyautogui.hotkey('ctrl','v') print("也就是说正则表达式:{} Done".format(string)) elif cmd_type == 3.0: wait_time = sheet.cell_value(i, 2) time.sleep(wait_time) print("到时 {} 秒 Done".format(wait_time)) elif cmd_type == 4.0: hotkey = sheet.cell_value(i, 2) time.sleep(1) pyautogui.hotkey(hotkey) print("按下 {} Done".format(hotkey)) time.sleep(1) i = i + 1def WorkFunction2(sheet) : while True: WorkFunction1(sheet) time.sleep(2)if __name__ == '__main__': start_time = time.time() file = "info.xlsx" xr = xlrd.open_workbook(filename=file) sheet = xr.sheet_by_index(0) print("------欢迎用作则会抢得课程序员------") print("---------@danteking---------") print("1.抢得课一次") print("2.蹲点等人退课后抢得指定课") choice = input(">>") start_time = time.time() if choice == "1": WorkFunction1(sheet) elif choice == "2": WorkFunction2(sheet) else: print("非法也就是说,淡出") end_time = time.time() time_consume = end_time - start_time time_consume = ('%.2f' % time_consume) print("耗时 {} 秒".format(time_consume))123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101。桂林不孕不育
常德哪家医院看不孕不育比较好
贵阳哪家医院看癫痫好
急支糖浆适合哪种咳嗽
身体乏力
急支糖浆是什么药?
腹泄
驱虫药
常德哪家医院看不孕不育比较好
贵阳哪家医院看癫痫好
急支糖浆适合哪种咳嗽
身体乏力
急支糖浆是什么药?
腹泄
驱虫药
标签:脚本
相关阅读
-
利兴发展(00068)根据退出安排购入PureCircle Limited股份
智通政经APP讯,利兴发展00068发布公告,就有关PureCircle Limited前称Ingredion SRSS Holdings Limited,标售一些公司股权的复出安排。
- 2025-08-27《浪姐3》姐姐集体卸妆,躲过了陈樱子,却被于文文给美到了
- 2025-08-27维科技术(600152.SH)拟将附属公司维科新能源的40%股权以946万元转让至维新同创
- 2025-08-27不联网物理隔绝的系统就很安全?黑客:你还有风扇呢,看叙利亚案例
- 2025-08-27拓展风力发电领域 海力风电(301155.SZ)成之收购海恒如东100%股权
- 2025-08-27《龙王之魔童闹海》领衔612部新片,重磅来袭!
- 2025-08-27B站悄悄上线了服务端,竟然就是个套壳浏览器?
- 2025-08-27华兰生物:取得爱滋病人免疫球蛋白药品注册证书
- 2025-08-27《声生不息》官宣张智霖王源加盟,节目将于29日播映
- 2025-08-27泽连斯基:我想拼装安-225
- 2025-08-27中信海直:拟约4.75亿元购置6架CH-