|
|
hai 8 meses | |
|---|---|---|
| data | hai 8 meses | |
| docs | hai 8 meses | |
| scripts | hai 8 meses | |
| src | hai 8 meses | |
| web | hai 8 meses | |
| .env.example | hai 8 meses | |
| .gitignore | hai 8 meses | |
| .mcp-gogs.json | hai 8 meses | |
| CLAUDE.md | hai 8 meses | |
| README.md | hai 8 meses | |
| WEB_UI_README.md | hai 8 meses | |
| package-lock.json | hai 8 meses | |
| package.json | hai 8 meses | |
| tsconfig.json | hai 8 meses |
A TypeScript-based web scraper for extracting information from webshops with persistent storage, scheduled scraping, and change detection.
Clone and install:
git clone <repository-url>
cd webshop-scraper
npm install
Build:
npm run build
Configure environment:
API_KEY=your-secret-key
PORT=3000
MAX_CONCURRENT_JOBS=3
Start:
npm start
sudo ./scripts/install.sh
See API Documentation for complete endpoint reference.
Create a scraping job:
curl -X POST http://localhost:3000/api/jobs \
-H "Authorization: Bearer your-secret-key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example-shop.com"}'
Get shop information:
curl http://localhost:3000/api/shops/:id \
-H "Authorization: Bearer your-secret-key"
Get shop results:
curl "http://localhost:3000/api/shops/:id/results?limit=10" \
-H "Authorization: Bearer your-secret-key"
# Development mode
npm run dev
# Watch mode
npm run watch
# Build
npm run build
Data is stored in data/shops.db (SQLite). The database includes:
View logs using journalctl:
sudo journalctl -u webshop-scraper -f
ISC