Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix: demo code-style problems

Cu1111fe8b9fa48e9b
diff --git a/examples/features/blocked_domains.py b/examples/features/blocked_domains.py
index 3de5e3046..a6f9e0738 100644
--- a/examples/features/blocked_domains.py
+++ b/examples/features/blocked_domains.py
@@ -17,13 +17,13 @@ llm = ChatOpenAI(model='gpt-4o-mini')
task = 'Navigate to example.com, then try to go to x.com, then facebook.com, and finally visit google.com. Tell me which sites you were able to access.'
prohibited_domains = [
- 'x.com', # Block X (formerly Twitter) - "locked the f in"
- 'twitter.com', # Block Twitter (redirects to x.com anyway)
- 'facebook.com', # Lock the F in Facebook too
- '*.meta.com', # Block all Meta properties
- '*.adult-site.com', # Block all subdomains of adult sites
+ 'x.com', # Block X (formerly Twitter) - "locked the f in"
+ 'twitter.com', # Block Twitter (redirects to x.com anyway)
+ 'facebook.com', # Lock the F in Facebook too
+ '*.meta.com', # Block all Meta properties
+ '*.adult-site.com', # Block all subdomains of adult sites
'https://explicit-content.org', # Block specific protocol/domain
- 'gambling-site.net', # Block gambling sites
+ 'gambling-site.net', # Block gambling sites
]
browser_session = BrowserSession(
@@ -43,7 +43,7 @@ agent = Agent(
async def main():
print('Demo: Blocked Domains Feature - "Lock the F in" Edition')
- print('We\'re literally locking the F in Facebook and X!')
+ print("We're literally locking the F in Facebook and X!")
print(f'Prohibited domains: {prohibited_domains}')
print('The agent will try to visit various sites, but blocked domains will be prevented.')
print()