feat: 更改playwright 的配置去掉本地测试时的代理和有头选项
This commit is contained in:
parent
3aee8f4033
commit
848f21b609
@ -87,7 +87,7 @@ class DailymotionClient:
|
|||||||
EMAIL = "copyright@qiyi.com"
|
EMAIL = "copyright@qiyi.com"
|
||||||
PASSWORD = "ppsIQIYI2018@"
|
PASSWORD = "ppsIQIYI2018@"
|
||||||
|
|
||||||
def __init__(self, headless: bool = False):
|
def __init__(self, headless: bool = True):
|
||||||
self.email = self.EMAIL
|
self.email = self.EMAIL
|
||||||
self.password = self.PASSWORD
|
self.password = self.PASSWORD
|
||||||
self.headless = headless
|
self.headless = headless
|
||||||
@ -96,7 +96,7 @@ class DailymotionClient:
|
|||||||
self._pw = sync_playwright().start()
|
self._pw = sync_playwright().start()
|
||||||
self.browser: Browser = self._pw.chromium.launch(
|
self.browser: Browser = self._pw.chromium.launch(
|
||||||
headless=self.headless,
|
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(
|
self.context = self.browser.new_context(
|
||||||
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user