Scrape any site, harvest documents, and ask AI anything about them. Runs 100% locally.
Live scrape of a real page β title and structure extracted in seconds, ready for AI analysis.
DeepScrape started as a simple PDF downloader and grew β across five test-driven build rounds β into a full document-intelligence toolkit. It fetches even bot-protected and login-walled pages, harvests PDFs/DOCX/XLSX/CSV, and lets you chat with what it finds using a local LLM. No API keys, no cloud, nothing leaves your machine.
Use it three ways: a Streamlit web app, a REST API, or a command-line tool.
- Chat with your documents β RAG over harvested files with source citations and multi-turn memory
- Vision analysis β screenshots a page and reads its charts, images, and layout with a vision model
- Gets past defenses β TLS-fingerprint impersonation, proxy rotation, and cookie/header auth for login-walled pages
- Smart crawling β the AI decides which links to follow toward your goal; or ingest a whole site via
sitemap.xml - Structured extraction β turn any page into a table (name, price, dateβ¦) with a majority-vote "tournament" mode for accuracy
- Hands-free monitoring β watch pages on a schedule and get Slack/Discord alerts when they change
- Fully local and private β all AI runs through Ollama on your own hardware
Every page fetch cascades through a four-tier pipeline β it only escalates to a heavier tier when the lighter one is blocked, so static pages are instant and hard pages still get through:
flowchart LR
A[URL] --> B{Disk cache<br/>β€1h old?}
B -->|hit| Z[HTML]
B -->|miss| C[Plain requests<br/>+ auth cookies]
C -->|blocked| D[TLS impersonation<br/>curl_cffi + proxies]
D -->|blocked| E[Headless Chromium<br/>Playwright]
C -->|ok| Z
D -->|ok| Z
E --> Z
Z --> F[AI Pipeline<br/>Ollama]
# 1. Clone & install
git clone https://github.com/SummitAnthony/DeepScrape-AI-Powered-Scraper.git
cd DeepScrape-AI-Powered-Scraper
pip install -r requirements.txt
playwright install chromium
# 2. Install a local model (for AI features)
# Get Ollama from https://ollama.ai, then:
ollama pull llama3
ollama pull nomic-embed-text # for RAG chat
# 3. Launch the web app
streamlit run main.pyWeb app β the full experience with live-streaming AI, RAG chat, and visual analysis:
streamlit run main.pyCommand line β drive the pipeline from your terminal, pipe JSON anywhere:
python cli.py scrape https://example.com
python cli.py pdfs https://example.com
python cli.py extract https://example.com --fields "name,price,date"REST API β integrate DeepScrape into any app or script:
uvicorn api:app # interactive docs at http://localhost:8000/docscurl -X POST localhost:8000/extract \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "fields": ["name", "price"]}'- Four-tier pipeline β cache β requests β TLS impersonation β headless Chromium (Playwright)
- Anti-bot resilience β
curl_cffiChrome TLS fingerprint + per-request proxy rotation viaproxies.txt - Authenticated scraping β drop a
cookies.json({"cookies": {...}, "headers": {...}}), injected across every tier - Page caching β scraped pages cached on disk (1h TTL) so re-analysis is instant
- Deep crawl β follow same-domain links to depth 3, respecting
robots.txt - AI smart crawl β give a goal ("find 2024 exam papers") and the LLM ranks which links to follow
- Sitemap ingestion β read
sitemap.xml(incl. nested indexes) for instant whole-site URL discovery - Multi-format harvesting β download PDF, DOCX, XLSX, CSV concurrently, all extractable for AI
- Chat with content or documents β live-streaming answers, any installed model
- RAG chat β chunk β embed β SQLite vector store β cited answers with multi-turn memory
- Map-reduce analysis β oversized content is chunked, analyzed, and merged automatically
- Structured extraction β fields β JSON β table with CSV/JSON export, plus tournament mode (extract 3Γ, majority-vote for accuracy)
- Visual analysis β full-page screenshot analyzed by a vision model (llava) for charts & layout
- Watch mode β snapshot a page and diff added/removed content between checks
- Scheduled runner β
python watch_runner.pybatch-checks all watched URLs (cron / Task Scheduler friendly) - Webhook alerts β set
DEEPSCRAPE_WEBHOOK_URLfor Slack/Discord/generic notifications on change - Scrape history β every job logged to SQLite with one-click re-run in the UI
DeepScrape was developed across 5 iterative build rounds, every feature shipped red-green TDD:
| 153 tests | across 18 test suites, all passing |
| CI on every push | GitHub Actions runs the full suite |
| 12 focused modules | clean separation: fetch, parse, RAG, vision, watch, API, CLI |
python -m pytest -q # run the full suiteDeepScrape-AI-Powered-Scraper/
βββ main.py # Streamlit web app (all features)
βββ cli.py # Command-line interface
βββ api.py # FastAPI REST server
βββ scrape.py # Four-tier fetch pipeline, crawler, sitemap, downloads
βββ parse.py # Ollama: streaming, map-reduce, structured + tournament extraction
βββ rag.py # RAG: chunking, embeddings, SQLite vector store, cited answers
βββ vision.py # Screenshot + vision-model analysis
βββ conversation.py # Multi-turn chat memory (budget-trimmed)
βββ watch.py # Page snapshots + change diffing
βββ watch_runner.py # Scheduled batch watcher
βββ notify.py # Slack/Discord/generic webhook alerts
βββ history.py # Scrape-history job log
βββ tests/ # 18 pytest suites (153 tests)
βββ requirements.txt
- Python 3.8+ on Windows, macOS, or Linux
- Ollama with at least one model pulled (for AI features)
- Playwright manages its own headless Chromium β no Chrome/ChromeDriver install needed
| Symptom | Fix |
|---|---|
| Browser / "executable doesn't exist" errors | playwright install chromium |
| AI features not responding | Ensure ollama serve is running and a model is pulled |
| RAG chat indexing fails | Pull the embedding model: ollama pull nomic-embed-text |
| Visual analysis fails | Pull a vision model: ollama pull llava |
Contributions welcome β please open an issue or PR. Run python -m pytest -q before submitting.
MIT β see LICENSE.
Ollama Β· Playwright Β· Streamlit Β· FastAPI
