A comprehensive real estate scraping and analysis system for Vienna, Austria.
- Python 3.11+
- MongoDB
- Telegram Bot (optional)
git clone <repository-url>
cd immo-scouter
pip install -r Project/requirements.txtCopy config.json.default to config.json and update with your settings:
{
"mongodb_uri": "mongodb://localhost:27017/immo",
"telegram": {
"telegram_main": {
"bot_token": "YOUR_BOT_TOKEN",
"chat_id": "YOUR_CHAT_ID"
}
}
}The application supports loading configuration from environment variables, perfect for GitHub Actions:
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection string | mongodb://user:pass@host:port/db |
TELEGRAM_MAIN_BOT_TOKEN |
Telegram bot token for main channel | 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz |
TELEGRAM_MAIN_CHAT_ID |
Telegram chat ID for main channel | -1001234567890 |
| Variable | Description | Default |
|---|---|---|
TELEGRAM_BOT_VIENNA_TOKEN |
Telegram bot token for Vienna channel | Uses main token |
TELEGRAM_BOT_VIENNA_CHAT_ID |
Telegram chat ID for Vienna channel | Uses main chat ID |
OLLAMA_BASE_URL |
Ollama API base URL | http://localhost:11434 |
OLLAMA_MODEL |
Ollama model name | llama3.1:8b |
OPENAI_API_KEY |
OpenAI API key | null |
OPENAI_MODEL |
OpenAI model name | gpt-4o-mini |
MINIO_ENDPOINT |
MinIO server endpoint | localhost:9000 |
MINIO_ACCESS_KEY |
MinIO access key | minioadmin |
MINIO_SECRET_KEY |
MinIO secret key | minioadmin |
MINIO_BUCKET_NAME |
MinIO bucket name | immo-images |
name: Run Immo-Scouter
on:
schedule:
- cron: '0 8 * * *' # Run daily at 8 AM
workflow_dispatch: # Allow manual trigger
jobs:
run-scraper:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
cd Project
pip install -r requirements.txt
- name: Run Immo-Scouter
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
TELEGRAM_MAIN_BOT_TOKEN: ${{ secrets.TELEGRAM_MAIN_BOT_TOKEN }}
TELEGRAM_MAIN_CHAT_ID: ${{ secrets.TELEGRAM_MAIN_CHAT_ID }}
TELEGRAM_BOT_VIENNA_TOKEN: ${{ secrets.TELEGRAM_BOT_VIENNA_TOKEN }}
TELEGRAM_BOT_VIENNA_CHAT_ID: ${{ secrets.TELEGRAM_BOT_VIENNA_CHAT_ID }}
run: |
cd Project
python run.py --send-to-telegram
- name: Run Top5 Report
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
TELEGRAM_MAIN_BOT_TOKEN: ${{ secrets.TELEGRAM_MAIN_BOT_TOKEN }}
TELEGRAM_MAIN_CHAT_ID: ${{ secrets.TELEGRAM_MAIN_CHAT_ID }}
run: |
cd Project
python run_top5.pyThe application supports different buyer profiles for customized property scoring:
owner_occupier(default) - Prefers newer, efficient homes with minimal renovationdiy_renovator- Investment and renovation focusgrowing_family- Space and schools priorityurban_professional- Location and lifestyleeco_conscious- Energy efficiency focusretiree- Comfort and accessibilitybudget_buyer- Lowest price prioritydefault- Balanced scoring
# Use default profile (owner_occupier)
python run.py
# Use specific profile
python run.py --buyer-profile=growing_family
# Use persona enum shorthand
python run_top5.py --buyer-persona=owner_occupier
# Top5 with specific profile
python run_top5.py --buyer-profile=budget_buyer
# Scan deeper or faster
python run.py --deep-scan # up to 20 pages/source (configurable)
python run.py --quick-scan # skim ~4 pages/source for a quick refreshcd Project
# Run all scrapers (now ~12 pages/source by default)
python run.py
# Run with Telegram notifications
python run.py --send-to-telegram
# Run specific scraper only
python run.py --willhaben-only
python run.py --immo-kurier-only
python run.py --derstandard-only
# Run with specific buyer profile
python run.py --buyer-profile=urban_professional --send-to-telegram
# Deep dive for better offers
python run.py --deep-scancd Project
# Run Top5 report
python run_top5.py
# Run with specific buyer profile
python run_top5.py --buyer-profile=retireeDashboard uses Next.js API routes under dashboard/app/api/. The legacy Flask Project/Api/ server has been removed.
- Multi-source scraping: Willhaben, ImmoKurier, DerStandard
- Intelligent scoring: AI-powered property evaluation
- Telegram integration: Real-time notifications
- Buyer profiles: Customized scoring for different buyer types
- Image handling: Automatic image download and storage
- MongoDB storage: Robust data persistence
- GitHub Actions ready: Full CI/CD support
Project/
βββ Application/
β βββ main.py # Main orchestration
β βββ scoring.py # Property scoring logic
β βββ buyer_profiles.py # Buyer profile definitions
β βββ rating_calculator.py # Rating calculations
β βββ scraping/ # Scrapers
βββ Integration/
β βββ mongodb_handler.py # Database operations
β βββ telegram_bot.py # Telegram integration
β βββ minio_handler.py # Image storage
βββ Domain/
β βββ listing.py # Data models
β βββ location.py # Location utilities
βββ UI/ # Web interface
cd Tests
# Run all tests
python run_tests.py
# Test specific functionality
python test_github_actions_simple.py
python test_env_var_fallback.py
python test_buyer_profiles.pyThe application loads configuration in this order:
- config.json file (if found)
- Environment variables (override config.json values)
- Default values (for missing configuration)
- Sensitive data stored in GitHub Secrets
- Environment variable fallbacks for testing
- Graceful error handling for missing services
- Comprehensive logging
- Telegram error notifications
- Performance metrics
- Data quality validation
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License.