AI Web Scraper is a Streamlit-based web scraping tool that extracts content from webpages using Selenium & Browserless.io, and then leverages DeepSeek V3 AI for intelligent data extraction. Users can scrape, extract, and process specific information from websites using natural language queries.
🔗 Live App: AI Web Scraper
📚 GitHub Repository: Sacarianos/ai_webscraper
✔️ Headless Web Scraping using Selenium + Browserless.io
✔️ AI-Powered Data Extraction with DeepSeek V3
✔️ Streamlit UI for easy interaction
✔️ Handles JavaScript-rendered pages
✔️ Secure API Key Management via secrets.toml
✔️ Error Handling & Logging to prevent crashes
git clone https://github.com/Sacarianos/ai_webscraper.git
cd ai_webscraperpython -m venv ai
source ai/bin/activate # MacOS/Linux
ai\Scripts\activate # Windowspip install -r requirements.txt- Sign up for Browserless.io: https://www.browserless.io
- Copy your API Key
- Store it in
.streamlit/secrets.toml:[browserless] api_key = "your_browserless_api_key"
- Sign up for DeepSeek AI: https://deepseek.com
- Copy your API Key
- Store it in
.streamlit/secrets.toml:[deepseek] api_key = "your_deepseek_api_key"
streamlit run main.pyThis will launch the web interface in your browser.
ai_webscraper/
│── .streamlit/ # Streamlit configuration & API keys
│ ├── secrets.toml # API Keys (DO NOT COMMIT)
│── ai/ # Virtual environment (not included in repo)
│── scrape.py # Web scraping logic (Selenium & Browserless)
│── parse.py # AI-powered data extraction (DeepSeek V3)
│── main.py # Streamlit App UI
│── requirements.txt # Python dependencies
│── README.md # Documentation
│── .gitignore # Ignore unnecessary files
- Provide a URL of the page you want to scrape.
- The app renders the page using Selenium and retrieves its content.
- Input a natural language query (e.g., "Extract all product prices").
- The DeepSeek V3 AI-powered parser extracts relevant content from the page.
🔍 Why Use DeepSeek V3?
- Advanced LLM capabilities to extract and structure data.
- Handles complex queries with high accuracy.
- Faster response times for real-time extraction.
📏 How We Use DeepSeek V3:
- The extracted page content is sent to DeepSeek V3 API, which processes structured data extraction based on the user’s query.
- It understands context and filters relevant information using advanced AI.
- Push your code to GitHub.
- Go to Streamlit Cloud.
- Select "Deploy a new app" and connect your repository.
- Set secrets in Streamlit Cloud (
Secrets> Add API keys). - Click Deploy.
- Check if Browserless.io API Key is valid.
- Ensure Selenium session is fresh (restart the app).
- Ensure
secrets.tomlexists and contains valid keys. - If using Streamlit Cloud, add secrets under Settings > Secrets.
✅ Add support for multiple URLs
✅ Improve DeepSeek AI-based extraction accuracy
✅ Enhance error logging & handling
Want to improve this project? Feel free to submit issues or pull requests!
This project is MIT Licensed.
🚀 Enjoy scraping the web with AI!
🔗 Live App: AI Web Scraper
📚 GitHub Repository: Sacarianos/ai_webscraper