随笔分类 -  playwright

摘要:拉取官方镜像: docker pull mcr.microsoft.com/playwright/python:v1.31.0-focal 运行: docker run -it --name=python_playwright -v /Users/kaka/miniconda3/envs/playw 阅读全文
posted @ 2023-03-16 18:16 爱家家的卡卡 阅读(441) 评论(0) 推荐(0) 编辑
摘要:我的Dockerfile文件: 查看代码 FROM mcr.microsoft.com/playwright/python:v1.31.0 WORKDIR ./project ADD . . RUN pip install -r requirements.txt ENTRYPOINT ["/bin/ 阅读全文
posted @ 2023-03-16 17:15 爱家家的卡卡 阅读(298) 评论(0) 推荐(0) 编辑
摘要:下载官方镜像:https://playwright.dev/python/docs/docker 使用命令; docker pull mcr.microsoft.com/playwright/python:v1.31.0-focal 然后运行: docker run -it --rm --name= 阅读全文
posted @ 2023-03-16 16:37 爱家家的卡卡 阅读(523) 评论(0) 推荐(0) 编辑
摘要:昨天下午放假了,就没有继续研究这个,今天继续:根据报错内容,意思是:我的base image用的是debian,但是它只支持Ubantu 所以,我们修改我们的Dockerfile: 1 FROM brunneis/python:3.8.3-ubuntu-20.04 2 3 WORKDIR ./pro 阅读全文
posted @ 2023-03-09 10:52 爱家家的卡卡 阅读(140) 评论(0) 推荐(0) 编辑
摘要:记录错误: 1 (base) kaka@KakadeMacBook-Pro project % docker images 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 python/playwright_tianmao 3.10 24afb40d4b24 13 阅读全文
posted @ 2023-03-08 12:42 爱家家的卡卡 阅读(95) 评论(0) 推荐(0) 编辑
摘要:之前是用selenium做的网络爬虫,这次用playwright,不过只是做了一个简单的,获取数据的response: import logging from playwright.sync_api import Playwright, sync_playwright, expect # setup 阅读全文
posted @ 2023-02-08 17:25 爱家家的卡卡 阅读(393) 评论(0) 推荐(0) 编辑
摘要:from playwright.sync_api import Playwright, sync_playwright, expect def run(playwright: Playwright) -> None: user_data_dir = "/Users/kaka/Library/Appl 阅读全文
posted @ 2023-01-11 10:19 爱家家的卡卡 阅读(402) 评论(0) 推荐(0) 编辑
摘要:思路说明 使用locator定位到要拖动滑块元素,如元素名叫ele 获取元素ele的bounding_box含4分属性值:x,y,width,height 把鼠标移动到元素ele的中心点,中心点位置为:x+width/2,y+height/2 按下鼠标 计算出要移动的下一个位置,以长条滑块为例,拖动 阅读全文
posted @ 2023-01-09 17:43 爱家家的卡卡 阅读(859) 评论(0) 推荐(0) 编辑
摘要:kaka@KakadeMacBook-Pro PythonLearn % pip install pytest-playwright zsh: command not found: pip kaka@KakadeMacBook-Pro PythonLearn % python3 Python 3.1 阅读全文
posted @ 2023-01-06 10:04 爱家家的卡卡 阅读(425) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示