pyppeteer 0.2.6 requires websockets<10.0,>=9.1, but you have websockets 10.1 which is incompatible. Successfully installed greenlet-1.1.3 playwright-1.26.0 pyee-8.1.0 websockets-10.1 # 一定要注意这个要在 user用户下, 千万不要切换到 root 用户下安装, 不然在启动服务的时候能折磨死你,会报错的 https://blog.csdn.net/u010168781/article/details/121344273 (CPU) default:/app/url_to_html_server$playwright install
Chromium 106.0.5249.30 (playwright build v1024) downloaded to /headless/.cache/ms-playwright/chromium-1024 Downloading FFMPEG playwright build v1007 - 2.6 Mb [================] 100% 0.0s FFMPEG playwright build v1007 downloaded to /headless/.cache/ms-playwright/ffmpeg-1007 Downloading Firefox 104.0 (playwright build v1350) - 76.5 Mb [======] 100% 0.0s Firefox 104.0 (playwright build v1350) downloaded to /headless/.cache/ms-playwright/firefox-1350 Downloading Webkit 16.0 (playwright build v1715) - 111.3 Mb [=======] 100% 0.0s Webkit 16.0 (playwright build v1715) downloaded to /headless/.cache/ms-playwright/webkit-1715 (CPU) user@cceca64648ff:/app/url_to_html_server$ # 启动python服务 (CPU) default:/app/url_to_html_server$ ls 1.html request_test1.py LICENSE.chromedriver request_test_custom.py __pycache__ requestments.txt _automation_size.lock screenshot-chromium.png automation_size.txt screenshot-firefox.png chromedriver screenshot-webkit.png config start.py get_page_source_from_playwright.py start.py.bak get_page_source_from_playwright.py1 start.py.bak2 get_page_source_from_selenium.py test1.py log utils request_test.py zlog (CPU) default:/app/url_to_html_server$ python3 start.py /headless/Desktop/CPU/lib/python3.8/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (5.1.0)/charset_normalizer (2.0.9) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " INFO: Uvicorn running on http://0.0.0.0:9878 (Press CTRL+C to quit) INFO: Started parent process [11958] /headless/Desktop/CPU/lib/python3.8/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (5.1.0)/charset_normalizer (2.0.9) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " /headless/Desktop/CPU/lib/python3.8/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (5.1.0)/charset_normalizer (2.0.9) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " /headless/Desktop/CPU/lib/python3.8/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (5.1.0)/charset_normalizer (2.0.9) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported " INFO: Started server process [11962] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Started server process [11961] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Started server process [11963] INFO: Waiting for application startup. INFO: Application startup complete.
测试
火狐
chromium
测试webkit
时间校对
1 2 3 4 5 6 7 8 9 10
user@cceca64648ff:~/Desktop$ date -R Mon, 16 Jan 2023 07:17:14 +0000 user@cceca64648ff:~/Desktop$ sudo su root@cceca64648ff:/headless/Desktop# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime root@cceca64648ff:/headless/Desktop# echo 'Asia/Shanghai' >/etc/timezone root@cceca64648ff:/headless/Desktop# su user user@cceca64648ff:~/Desktop$ date -R Mon, 16 Jan 2023 15:18:48 +0800 user@cceca64648ff:~/Desktop$ date -R
[root@localhost software]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry.cn-hangzhou.aliyuncs.com/mindcons/ubuntu-focal-desktop 1.12.0 fc203ef9489f 10 months ago 8.86GB postgres 12.3 b03968f50f0e 3 years ago 313MB