mirror of
https://github.com/browser-use/web-ui.git
synced 2026-03-22 11:17:17 +08:00
Update custom_browser.py
This commit is contained in:
@@ -4,16 +4,17 @@
|
||||
# @ProjectName: browser-use-webui
|
||||
# @FileName: browser.py
|
||||
|
||||
from browser_use.browser.browser import Browser, BrowserConfig
|
||||
from browser_use.browser.context import BrowserContextConfig, BrowserContext
|
||||
from browser_use.browser.browser import Browser
|
||||
from browser_use.browser.context import BrowserContext, BrowserContextConfig
|
||||
|
||||
from .custom_context import CustomBrowserContext
|
||||
|
||||
|
||||
class CustomBrowser(Browser):
|
||||
|
||||
async def new_context(
|
||||
self, config: BrowserContextConfig = BrowserContextConfig(), context: CustomBrowserContext = None
|
||||
self,
|
||||
config: BrowserContextConfig = BrowserContextConfig(),
|
||||
context: CustomBrowserContext = None,
|
||||
) -> BrowserContext:
|
||||
"""Create a browser context"""
|
||||
return CustomBrowserContext(config=config, browser=self, context=context)
|
||||
|
||||
Reference in New Issue
Block a user