cleanup
This commit is contained in:
58
README.md
58
README.md
@ -15,22 +15,9 @@ A web-based map visualization tool for searching and exploring listings from kle
|
||||
|
||||
## Architecture
|
||||
|
||||
**Backend**: Flask API server with multi-threaded scraping
|
||||
**Frontend**: Vanilla JavaScript with Leaflet.js for maps
|
||||
**Data Sources**: kleinanzeigen.de, OpenStreetMap/Nominatim
|
||||
|
||||
## Requirements
|
||||
|
||||
### Python Packages
|
||||
|
||||
```bash
|
||||
pip install flask flask-cors beautifulsoup4 lxml urllib3 requests
|
||||
```
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Python 3.8+
|
||||
- nginx (for production deployment)
|
||||
- **Backend**: Flask API server with multi-threaded scraping
|
||||
- **Frontend**: Vanilla JavaScript with Leaflet.js for maps
|
||||
- **Data Sources**: kleinanzeigen.de, OpenStreetMap/Nominatim
|
||||
|
||||
## Installation
|
||||
|
||||
@ -63,45 +50,9 @@ or via zypper
|
||||
zypper install python313-Flask python313-Flask-Cors python313-beautifulsoup4 python313-lxml python313-urllib3 python313-requests
|
||||
```
|
||||
|
||||
|
||||
### 4. Configure Application
|
||||
|
||||
Create `config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"server": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 5000,
|
||||
"debug": false
|
||||
},
|
||||
"scraping": {
|
||||
"session_timeout": 300,
|
||||
"listings_per_page": 25,
|
||||
"max_workers": 5,
|
||||
"min_workers": 2,
|
||||
"rate_limit_delay": 0.5,
|
||||
"geocoding_delay": 1.0
|
||||
},
|
||||
"cache": {
|
||||
"zip_cache_file": "zip_cache.json"
|
||||
},
|
||||
"apis": {
|
||||
"nominatim": {
|
||||
"url": "https://nominatim.openstreetmap.org/search",
|
||||
"user_agent": "kleinanzeigen-scraper"
|
||||
},
|
||||
"kleinanzeigen": {
|
||||
"base_url": "https://www.kleinanzeigen.de"
|
||||
}
|
||||
},
|
||||
"user_agents": [
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
||||
]
|
||||
}
|
||||
```
|
||||
Create/modify [config.json](backend/config.json).
|
||||
|
||||
### 5. Create Systemd Service
|
||||
|
||||
@ -170,7 +121,6 @@ server {
|
||||
index index.html;
|
||||
}
|
||||
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:27979;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
Reference in New Issue
Block a user