Multi-threaded web scraper with intelligent contact extraction and a real-time dashboard
FieldScrape is a multi-threaded web scraping engine with a Flask-powered real-time dashboard that crawls websites to extract contact information — emails and phone numbers — using intelligent link prioritization, concurrent workers, and a custom SQLite storage layer with built-in deduplication.
Built for lead generation, market research, and OSINT data collection — with responsible crawling practices baked in.
Scrape smarter, not harder — FieldScrape prioritizes contact pages, respects
robots.txt, filters false positives, and deduplicates results automatically.
| Feature | Description |
|---|---|
| 🧵 Multi-Threaded Crawling | 3 concurrent daemon workers processing jobs from a shared queue |
| 🧠 Smart Link Prioritization | Contact, about, support, and team pages are automatically crawled first |
| 📧 Dual Contact Extraction | Emails via mailto: links + regex; phones via tel: links + regex |
| 🚫 False Positive Filtering | Blocklist filters junk emails (e.g., @example.com, @sentry.io, image extensions) |
| 🤖 Polite Crawling | robots.txt compliance, 0.5s request delays, custom User-Agent |
| 📡 Real-Time Dashboard | Frontend polls every 2.5s for live job progress with animated status badges |
| 📥 CSV Export | Download extracted contacts per job (type, value, source URL) |
| 💾 Persistent Storage | SQLite database with contact deduplication per job |
| 🔄 Job Management | Create, monitor, expand, and delete scraping jobs from the UI |
| 🌐 RESTful API | Clean JSON API for programmatic access |
FieldScrape/
├── app.py # Flask application & REST API routes
├── scraper.py # Multi-threaded crawling engine with BFS
├── db.py # SQLite database layer (jobs + contacts)
├── templates/
│ └── index.html # Single-page dashboard interface
├── static/
│ ├── app.js # Polling, job management & UI interactions
│ └── style.css # Custom CSS with earthy color palette
├── scraper.sqlite3 # SQLite database (auto-generated, gitignored)
├── requirements.txt # Python dependencies
├── .gitignore
└── README.md
- Python 3.10+
- pip (Python package manager)
-
Clone the repository
git clone https://github.com/musamamaher-afk/FieldScrape.git cd FieldScrape -
Create a virtual environment
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
-
Open in browser
http://localhost:5050
- Enter Target URL — Provide the website URL you want to scrape
- Configure Max Pages — Set the crawl limit (1–200 pages, default 25)
- Start Scraping — Launch the job and watch progress update in real-time
- Expand Job Details — Click a job to see the crawl log and extracted contacts table
- Export — Download results as CSV for further use
- Clean Up — Delete completed or failed jobs
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Dashboard interface |
POST |
/api/jobs |
Start a new scraping job |
GET |
/api/jobs |
List all jobs with email/phone counts |
GET |
/api/jobs/<id> |
Get job details with contacts & crawl log |
DELETE |
/api/jobs/<id> |
Delete a completed/failed job |
GET |
/api/jobs/<id>/csv |
Download extracted contacts as CSV |
┌─────────────────┐ ┌──────────────────┐ ┌────────────────────┐
│ Flask Web UI │────▶│ Job Queue │────▶│ Thread Pool │
│ (Dashboard) │ │ (queue.Queue) │ │ (3 Daemon Workers) │
└─────────────────┘ └──────────────────┘ └────────┬───────────┘
▲ │
│ Polling ┌──────────────────┐ │ BFS Crawl
│ (2.5s) │ SQLite │ │ + Extraction
└────────────────│ (db.py) │◀─────────────┘
│ jobs + contacts │
└──────────────────┘
Data Flow:
- User submits a URL → JS sends
POST /api/jobs - Flask normalizes the URL, creates a job record, enqueues it
- A daemon worker picks up the job and crawls using BFS with priority sorting
- Contacts are deduplicated and stored; crawl logs are appended in real-time
- Frontend polls every 2.5s to update status badges and job details
- Priority Queue — Links containing keywords like
contact,about,support,team,connect,reach,get-in-touchare crawled first - Dual Extraction — First checks
mailto:andtel:link hrefs (most reliable), then runs regex on full page text (broader coverage) - Smart Filtering — Rejects emails from domains like
example.com,sentry.io,wixpress.com, and those matching image file extensions - Phone Validation — Only accepts numbers with 7–15 digits to filter noise
This tool is intended for ethical and legal use only. Always:
- Respect website Terms of Service
- Comply with
robots.txtdirectives - Use reasonable crawl delays
- Only scrape publicly available data
- Adhere to applicable data protection laws (GDPR, CCPA, etc.)
The author is not responsible for misuse of this tool.
Usama Younas
- GitHub: @musamamaher-afk
- Aspiring AI Engineer | Python Developer | Automation Enthusiast
This project is licensed under the MIT License — see the LICENSE file for details.
⭐ Star this repo if you found it useful!