- # https://pyperclip.readthedocs.io/en/latest/
- import pyperclip
- while True:
- # pyperclip.copy('Hello, world!')
- # pyperclip.paste()
- # pyperclip.waitForPaste()
- print(pyperclip.waitForNewPaste())
- # 获取要输入新的坐标,也可以通过autohotkey
- import time
- import pyautogui as pag
- import os
- try:
- while True:
- print("Press Ctrl-C to end")
- x, y = pag.position() # 返回鼠标的坐标
- posStr = "Position:" + str(x).rjust(4) + ',' + str(y).rjust(4)
- print(posStr) # 打印坐标
- time.sleep(0.2)
- os.system('cls') # 清楚屏幕
- except KeyboardInterrupt:
- print('end....')
- # 打印消息
- import pyautogui
- import time
- import pyperclip
- content = """
- 呼叫龙叔!
- 第二遍!
- 第三遍!
- 第四遍!
- 第五遍!
- """
- for line in list(content.split("\n"))*10:
- if line:
- pyautogui.click(433,605) #鼠标点击并定位到聊天窗口
- pyperclip.copy(line) #复制该行
- pyautogui.hotkey("ctrl","v") #粘贴,mac电脑则把ctrl换成command
- pyautogui.typewrite("\n") #发送
- time.sleep(5) #每次发完间隔5s
https://pymongo.readthedocs.io/en/stable/tutorial.html https://www.mongodb.com/languages/python https://zhuanlan.zhihu.com/p/51171906 https://www.runoob.com/python3/python-mongodb.html https://blog.baoshuo.ren/post/luogu-spider/ https://hub.docker.com/_/mongo 安装 MongoDB $ docker search mongo 启动一个mongo服务器实例 $ docker run --name some-mongo -d mongo:tag some-mongo是您要分配给容器的名称,tag是指定您想要的 MongoDB 版本的标签 MongoDB 的默认数据目录路径是/data/db 如下: $ docker run -it -v mongodata:/data/db -p 27017:27017 --name mongodb --restart unless-stopped -d mongo 你应该让 MongoDB 在端口 27017 上运行,并且可以通过localhostWindows 和 Ubuntu 20.04 上的URL访问 http://localhost:27017/ -p 是 HOST_PORT:CLIENT_PORT -P 随机端口 -p 27017:27017 :将容器的27017 端口映射到主机的27017 端口 -v mongodata:/data/db :将主机中当前目录下的db挂载到容器的/data/db,作为mongo数据存储目录 从另一个 Docker 容器连接到 MongoDB 镜像中的 MongoDB 服务器侦听标准 MongoDB 端口27017,因此通过 Docker 网络连接将与连接到远程mongod. 以下示例启动另一个 MongoDB 容器实例,并mongo针对上述示例中的原始 MongoDB 容器运行命令行客户端,从而允许您针对数据库实例执行 MongoDB 语句: $ docker run -it --network some-network --...
评论
发表评论