Rewrite PSN + CityHome scrapers, add price/m² map coloring, ratings system, and status dashboard
- Rewrite PSN scraper to use /api/units-list endpoint (single API call, no HTML parsing) - Fix CityHome scraper: GPS from multiple URL patterns, address from table cells, no 404 retries - Color map markers by price/m² instead of disposition (blue→green→orange→red scale) - Add persistent rating system (favorite/reject) with Flask ratings server and localStorage fallback - Rejected markers show original color at reduced opacity with 🚫 SVG overlay - Favorite markers shown as ⭐ star icons with gold pulse animation - Add "new today" marker logic (scraped_at == today) with larger pulsing green outline - Add filter panel with floor, price, hide-rejected controls and ☰/✕ toggle buttons - Add generate_status.py for scraper run statistics and status.html dashboard - Add scraped_at field to all scrapers for freshness tracking - Update run_all.sh with log capture and status generation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
14
run_all.sh
14
run_all.sh
@@ -16,6 +16,12 @@ NC='\033[0m'
|
||||
TOTAL=6
|
||||
CURRENT=0
|
||||
FAILED=0
|
||||
START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S")
|
||||
START_EPOCH=$(date +%s)
|
||||
LOG_FILE="$(pwd)/scrape_run.log"
|
||||
|
||||
# Mark status as running
|
||||
echo '{"status":"running"}' > status.json
|
||||
|
||||
show_help() {
|
||||
echo "Usage: ./run_all.sh [OPTIONS]"
|
||||
@@ -63,6 +69,8 @@ step() {
|
||||
}
|
||||
|
||||
# ── Scrapery (paralelně kde to jde) ─────────────────────────
|
||||
# Tee all output to log file for status generation
|
||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||
|
||||
step "Sreality"
|
||||
python3 scrape_and_map.py $SCRAPER_ARGS || { echo -e "${RED}✗ Sreality selhalo${NC}"; FAILED=$((FAILED + 1)); }
|
||||
@@ -91,6 +99,12 @@ python3 merge_and_map.py || { echo -e "${RED}✗ Merge selhal${NC}"; FAILED=$((F
|
||||
|
||||
# ── Otevření mapy ────────────────────────────────────────────
|
||||
|
||||
# ── Generování statusu ─────────────────────────────────────
|
||||
|
||||
END_EPOCH=$(date +%s)
|
||||
DURATION=$((END_EPOCH - START_EPOCH))
|
||||
python3 generate_status.py "$START_TIME" "$DURATION" "$LOG_FILE"
|
||||
|
||||
echo ""
|
||||
echo "============================================================"
|
||||
if [ $FAILED -eq 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user