feat: 更改playwright 的配置去掉本地测试时的代理和有头选项

This commit is contained in:
晓丰 2025-06-06 22:45:06 +08:00
parent 3aee8f4033
commit 848f21b609

View File

@ -87,7 +87,7 @@ class DailymotionClient:
EMAIL = "copyright@qiyi.com"
PASSWORD = "ppsIQIYI2018@"
def __init__(self, headless: bool = False):
def __init__(self, headless: bool = True):
self.email = self.EMAIL
self.password = self.PASSWORD
self.headless = headless
@ -96,7 +96,7 @@ class DailymotionClient:
self._pw = sync_playwright().start()
self.browser: Browser = self._pw.chromium.launch(
headless=self.headless,
proxy={'server':'http://127.0.0.1:7890'}
# proxy={'server':'http://127.0.0.1:7890'}
)
self.context = self.browser.new_context(
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) "