feat: 增加Docker容器环境

This commit is contained in:
听风
2025-11-06 14:50:19 +08:00
parent 7de1a30b92
commit de2389c9b1
14 changed files with 135 additions and 41 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ from time import sleep
import requests
from playwright.sync_api import sync_playwright
from conf import BASE_DIR, XHS_SERVER
from conf import BASE_DIR, XHS_SERVER, LOCAL_CHROME_HEADLESS
config = configparser.RawConfigParser()
config.read('accounts.ini')
@@ -20,7 +20,7 @@ def sign_local(uri, data=None, a1="", web_session=""):
chromium = playwright.chromium
# 如果一直失败可尝试设置成 False 让其打开浏览器,适当添加 sleep 可查看浏览器状态
browser = chromium.launch(headless=True)
browser = chromium.launch(headless=LOCAL_CHROME_HEADLESS)
browser_context = browser.new_context()
browser_context.add_init_script(path=stealth_js_path)