Files
browser-use/examples/captcha.py
Magnus Müller 08802a7530 Included demos videos for flight search, captcha, and custom functions (#38)
* Add captcha demo gif

* Captcha demo

* Host gif at imgur

* Try to include from other repo

* Hugging face example

* Try to display mp4

* Include mp4 with raw link

* Try with git user content .com

* More methods

* Update README.md

* Add custom function

* Try with only the link

* Readme update

* Display video

* Flight search example

* Update README.md

* Update prompts

* Prompts above videos

* Space between div and video

* Font size
2024-11-20 11:17:03 +01:00

32 lines
629 B
Python

"""
Simple try of the agent.
@dev You need to add OPENAI_API_KEY to your environment variables.
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import asyncio
from langchain_openai import ChatOpenAI
from browser_use import Agent
# NOTE: captchas are hard. For this example it works. But e.g. for iframes it does not.
# for this example it helps to zoom in.
llm = ChatOpenAI(model='gpt-4o')
agent = Agent(
task='go to https://captcha.com/demos/features/captcha-demo.aspx and solve the captcha',
llm=llm,
)
async def main():
await agent.run()
asyncio.run(main())