fix(dynamicFetcher): Fix a bug with real_chrome argument
This commit is contained in:
@@ -236,9 +236,7 @@ class DynamicSession:
|
|||||||
|
|
||||||
self.playwright = sync_context().start()
|
self.playwright = sync_context().start()
|
||||||
|
|
||||||
browser_launcher: BrowserType = getattr(
|
browser_launcher: BrowserType = self.playwright.chromium
|
||||||
self.playwright, "chrome" if self.real_chrome else "chromium"
|
|
||||||
)
|
|
||||||
if self.cdp_url:
|
if self.cdp_url:
|
||||||
browser = browser_launcher.connect_over_cdp(endpoint_url=self.cdp_url)
|
browser = browser_launcher.connect_over_cdp(endpoint_url=self.cdp_url)
|
||||||
self.context = browser.new_context(**self.context_options)
|
self.context = browser.new_context(**self.context_options)
|
||||||
@@ -484,9 +482,7 @@ class AsyncDynamicSession(DynamicSession):
|
|||||||
|
|
||||||
self.playwright: AsyncPlaywright = await async_context().start()
|
self.playwright: AsyncPlaywright = await async_context().start()
|
||||||
|
|
||||||
browser_launcher: AsyncBrowserType = getattr(
|
browser_launcher: AsyncBrowserType = self.playwright.chromium
|
||||||
self.playwright, "chrome" if self.real_chrome else "chromium"
|
|
||||||
)
|
|
||||||
if self.cdp_url:
|
if self.cdp_url:
|
||||||
browser = await browser_launcher.connect_over_cdp(endpoint_url=self.cdp_url)
|
browser = await browser_launcher.connect_over_cdp(endpoint_url=self.cdp_url)
|
||||||
self.context: AsyncBrowserContext = await browser.new_context(
|
self.context: AsyncBrowserContext = await browser.new_context(
|
||||||
|
|||||||
Reference in New Issue
Block a user