[Add] browser-use and main.py

This commit is contained in:
tv0924@icloud.com 2025-05-18 21:57:54 +09:00
commit 96914d44ac
221 changed files with 30952 additions and 1 deletions

22
browser-use/main.py Normal file
View file

@ -0,0 +1,22 @@
import asyncio
from dotenv import load_dotenv
load_dotenv()
from browser_use import Agent, Browser, BrowserConfig
from langchain_openai import ChatOpenAI
config = BrowserConfig(
proxy={"server": "http://127.0.0.1:3000"},
disable_security=True
)
browser = Browser(config=config)
async def main():
agent = Agent(
task="go to the website https://supabase.com and extract the client login URL and click github login button",
llm=ChatOpenAI(model="gpt-4o"),
browser=browser,
)
await agent.run()
asyncio.run(main())