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
notify user if something went wrong when running browser-use
Malik Talhaa6b80361f548
diff --git a/examples/discord_api.py b/examples/discord_api.pyindex 33ad4720f..57c247ab6 100644--- a/examples/discord_api.py+++ b/examples/discord_api.py@@ -86,9 +86,14 @@ class DiscordBot(commands.Bot):llm=self.llm,browser=browser)-result = await agent.run()- return result.history[-1].result[0].extracted_content++ if result.is_done():+ agent_message = result.history[-1].result[0].extracted_content+ else:+ agent_message = "Oops! Something went wrong while running Browser-Use."++ return agent_messageexcept Exception as e:raise Exception(f"Browser-use task failed: {str(e)}")