python 模拟鼠标,键盘点击
信息爆炸
'''消息轰炸模拟鼠标和键盘敲击''' import time from pynput.keyboard import Controller as key_col from pynput.mouse import Button,Controller def keyboard_input(insertword): keyboard=key_col() keyboard.type(insertword) def mouth(): mouse=Controller() mouse.press(Button.left) mouse.release(Button.left) def main(insertword,number): print('开始') time.sleep(5) for i in range(number): keyboard_input(insertword) mouth() if __name__ == '__main__': main('你好',5)
可用于抢红包,直播点击爱心,等等需要点击操作的应用场景