Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
MOD: update doc about how to use allowed_domains with sensitive_data
Daniel Hwangfcde20d5069b
diff --git a/docs/customize/sensitive-data.mdx b/docs/customize/sensitive-data.mdxindex 327297e64..371b0e90e 100644--- a/docs/customize/sensitive-data.mdx+++ b/docs/customize/sensitive-data.mdx@@ -15,7 +15,8 @@ Here's an example of how to use sensitive data:```pythonfrom dotenv import load_dotenvfrom langchain_openai import ChatOpenAI-from browser_use import Agent+from browser_use import Agent, Browser, BrowserConfig+from browser_use.browser.context import BrowserContextConfigload_dotenv()@@ -32,6 +33,11 @@ sensitive_data = {'x_name': 'magnus', 'x_password': '12345678'}# Use the placeholder names in your task descriptiontask = 'go to x.com and login with x_name and x_password then write a post about the meaning of life'+# Configure allowed_domains that the agent should be restricted to in BrowserContextConfig+context_config = BrowserContextConfig(+ allowed_domains=['example.com'],+)+# Pass the sensitive data to the agentagent = Agent(task=task,@@ -39,8 +45,8 @@ agent = Agent(sensitive_data=sensitive_data,browser=Browser(config=BrowserConfig(- allowed_domains=['example.com'], # domains that the agent should be restricted to- ),+ new_context_config=context_config+ )))