| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A distributed web crawler system with intelligent Hive controller for scalable web scraping and data collection.
# Clone the repository
git clone https://github.com/NeaByteLab/HiveMind-Crawler.git
cd HiveMind-Crawler
# Install dependencies
npm install
# Configure Redis connection (see Configuration section)Set these environment variables for configuration:
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# Crawler Configuration
CRAWLER_TIMEOUT=10000
CRAWLER_MAX_RETRIES=3
CRAWLER_USER_AGENT=HiveMind-Crawler/1.0
CRAWLER_MAX_CONCURRENT=2
CRAWLER_MAX_DEPTH=3
CRAWLER_HEARTBEAT_INTERVAL=10000
CRAWLER_DEAD_TIMEOUT=30000npm run devnpm start# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage# Lint code
npm run lint
# Fix linting issues
npm run lint:fix
# Check linting status
npm run lint:checkThe central intelligence that coordinates all crawler workers:
Individual worker processes that perform web scraping:
RESTful API for system management and monitoring:
HiveMind-Crawler/ ├── src/ │ ├── hive/ │ │ └── controller.js # 🐝 Hive controller logic │ ├── crawler/ │ │ └── worker.js # 🕷️ Crawler worker implementation │ ├── api/ │ │ └── server.js # 🌐 Fastify API server │ ├── config/ │ │ ├── redis.js # 🔧 Redis configuration │ │ ├── crawler.js # 🕷️ Crawler settings │ │ └── queues.js # 📋 Queue configuration │ ├── utils/ │ │ ├── logger.js # 📝 Logging utilities │ │ └── url.js # 🔗 URL processing utilities │ └── index.js # 🚀 Main application entry point ├── __tests__/ # 🧪 Test files ├── package.json # 📦 Project dependencies ├── eslint.config.js # 🔍 ESLint configuration ├── jest.config.js # 🧪 Jest configuration ├── jest.setup.js # 🧪 Jest setup └── README.md # 📖 This file
# Single URL
curl -X POST http://localhost:3000/crawl \
-H "Content-Type: application/json" \
-d '{"urls": "https://example.com", "priority": "high"}'
# Multiple URLs
curl -X POST http://localhost:3000/crawl \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com", "https://test.com"], "priority": "normal"}'curl http://localhost:3000/healthcurl http://localhost:3000/metricscurl "http://localhost:3000/results?url=https://example.com"curl -X POST http://localhost:3000/assign-domain \
-H "Content-Type: application/json" \
-d '{"crawlerId": "crawler-1", "domain": "example.com"}'Redis Connection Failed
# Ensure Redis is running
redis-server
# Check connection
redis-cli pingWorker Not Starting
# Check logs
npm run dev
# Verify Redis connection
# Check configuration filesHigh Memory Usage
The project includes comprehensive tests:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverageThis project is licensed under the MIT License - see the LICENSE file for details.
| Back | FazBrowse Home | New Git URL |