From d5486417e237cad35be5403cae642cc63f11428a Mon Sep 17 00:00:00 2001 From: localhorst Date: Tue, 25 Nov 2025 23:04:41 +0100 Subject: [PATCH] cleanup --- README.md | 58 ++++-------------------------------------------- web/js/config.js | 2 +- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 88226cb..0400127 100644 --- a/README.md +++ b/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; diff --git a/web/js/config.js b/web/js/config.js index e578128..07b47f2 100644 --- a/web/js/config.js +++ b/web/js/config.js @@ -1,7 +1,7 @@ // Auto-detect API base URL from current domain const API_BASE_URL = window.location.protocol + '//' + window.location.host; - //const API_BASE_URL = 'http://localhost:5000'; //used for development +//const API_BASE_URL = 'https://kleinanzeigen.mosad.xyz'; //used for development // Application state const AppState = {