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
|
## Architecture
|
||||||
|
|
||||||
**Backend**: Flask API server with multi-threaded scraping
|
- **Backend**: Flask API server with multi-threaded scraping
|
||||||
**Frontend**: Vanilla JavaScript with Leaflet.js for maps
|
- **Frontend**: Vanilla JavaScript with Leaflet.js for maps
|
||||||
**Data Sources**: kleinanzeigen.de, OpenStreetMap/Nominatim
|
- **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)
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -63,45 +50,9 @@ or via zypper
|
|||||||
zypper install python313-Flask python313-Flask-Cors python313-beautifulsoup4 python313-lxml python313-urllib3 python313-requests
|
zypper install python313-Flask python313-Flask-Cors python313-beautifulsoup4 python313-lxml python313-urllib3 python313-requests
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 4. Configure Application
|
### 4. Configure Application
|
||||||
|
|
||||||
Create `config.json`:
|
Create/modify [config.json](backend/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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. Create Systemd Service
|
### 5. Create Systemd Service
|
||||||
|
|
||||||
@ -170,7 +121,6 @@ server {
|
|||||||
index index.html;
|
index index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://127.0.0.1:27979;
|
proxy_pass http://127.0.0.1:27979;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Auto-detect API base URL from current domain
|
// Auto-detect API base URL from current domain
|
||||||
const API_BASE_URL = window.location.protocol + '//' + window.location.host;
|
const API_BASE_URL = window.location.protocol + '//' + window.location.host;
|
||||||
|
|
||||||
//const API_BASE_URL = 'http://localhost:5000'; //used for development
|
//const API_BASE_URL = 'http://localhost:5000'; //used for development
|
||||||
|
//const API_BASE_URL = 'https://kleinanzeigen.mosad.xyz'; //used for development
|
||||||
|
|
||||||
// Application state
|
// Application state
|
||||||
const AppState = {
|
const AppState = {
|
||||||
|
|||||||
Reference in New Issue
Block a user