This project demonstrates how to use the browser-use library with DeepSeek's language model for web automation tasks. It showcases a simple example of navigating to Reddit, performing a search, and extracting content.
- Web automation using browser-use library
- Integration with DeepSeek's powerful language model
- Automated browser interactions (navigation, search, clicking)
- Content extraction capabilities
- Simple and modern web interface for task execution
-
Install Python 3.11:
- Download and install from Python.org
-
Install Git:
- Download and install from Git Downloads
-
Install uv:
- Follow instructions at uv Documentation
- Clone the repository:
git clone [email protected]:muzafferkadir/browser-use-deepseek.git
cd browser-use-deepseek
- Create and activate virtual environment using uv:
uv venv --python 3.11
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
uv pip install -r requirements.txt
- Install Playwright browsers:
playwright install
- Set up API keys:
- Get your API key from DeepSeek Platform
- Or get your API key from OpenRouter
- Create a
.env
file in the project root (copy from .env.example) - Add your API key to the
.env
file
Run the example script:
python main.py
The script will:
- Navigate to Reddit
- Search for "browser-use"
- Click on the first post
- Extract and return the first comment
Run the web application:
python app.py
Then open your browser and go to one of these URLs:
- Local access: http://localhost:5001
- Network access: http://YOUR_IP_ADDRESS:5001 (replace YOUR_IP_ADDRESS with your computer's IP address)
Using the web interface:
- Enter your task in the text area
- Click the "Run Task" button
- Watch the progress in real-time
- See the results or any errors in the output section
Example tasks you can try:
- "Go to Reddit, search for 'browser-use' and return the first post's title"
- "Go to YouTube, search for 'browser automation' and get the first video's description"
- "Go to Wikipedia, search for 'Python programming' and return the first paragraph"
- "Go to https://www.youtube.com/@muzafferkadir and return the channel name"
- Python 3.8+
- DeepSeek API key
- Required Python packages (see requirements.txt)
MIT License
- browser-use library
- DeepSeek for their language model API