rewrite README: remove emojis, honest auto-apply status

This commit is contained in:
Aron Petau 2025-12-09 11:44:40 +01:00
parent ce66fc1933
commit 59eb94bd15

184
README.md
View file

@ -1,137 +1,115 @@
# inberlin-monitor # inberlin-monitor
Monitors [inberlinwohnen.de](https://www.inberlinwohnen.de/wohnungsfinder/) and [wgcompany.de](http://www.wgcompany.de) for new apartment/WG listings and sends Telegram notifications. Supports automatic application submission via autopilot mode. A Python bot that monitors Berlin's public housing portal (inberlinwohnen.de) and WG rooms (wgcompany.de). Sends Telegram notifications when new listings appear and can automatically apply to some listings.
## Features ## What it does
- 🔐 Logs in to your personal Wohnungsfinder for filtered results - Monitors inberlinwohnen.de for new apartment listings from 6 housing companies (HOWOGE, Gewobag, Degewo, Gesobau, Stadt und Land, WBM)
- ⏰ Checks every 5 minutes (configurable) - Monitors wgcompany.de for WG room listings with configurable filters
- 📱 Sends Telegram notifications for new listings with clickable links - Sends Telegram notifications with listing details
- 🤖 **Autopilot mode**: Automatically applies to new listings - Logs listing times to CSV for pattern analysis
- 📊 **/plot command**: Visualize when listings appear throughout the week - Auto-apply feature for supported housing companies
- 🏢 Supports 6 housing companies: HOWOGE, Gewobag, Degewo, Gesobau, Stadt und Land, WBM
- 🏠 **WGcompany.de**: Also monitors WG room listings with configurable search filters
- 💾 Persists state to detect only truly new listings
- 📈 Logs listing times for pattern analysis
## Supported Housing Companies ## Auto-Apply Support
| Company | Auto-Apply | Notes | The auto-apply feature is experimental and only works for some housing companies:
|---------|------------|-------|
| HOWOGE | ✅ | Direct form submission | | Company | Status | Notes |
| Gewobag | ✅ | Direct form submission | |---------|--------|-------|
| Degewo | ✅ | Via Wohnungshelden portal | | HOWOGE | Working | Tested and functional |
| Gesobau | ✅ | Direct form submission | | Degewo | Experimental | Uses Wohnungshelden portal, may need maintenance |
| Stadt und Land | ✅ | Direct form submission | | Gewobag | Not working | Needs implementation |
| WBM | ✅ | Direct form submission | | Gesobau | Not working | Needs implementation |
| Stadt und Land | Not working | Needs implementation |
| WBM | Not working | Needs implementation |
| WGcompany | Not supported | Monitoring only, no auto-apply |
## Setup ## Setup
### 1. Create Telegram Bot ### Docker (recommended)
1. Message [@BotFather](https://t.me/botfather) on Telegram
2. Send `/newbot` and follow the prompts
3. Copy the bot token
### 2. Get Your Chat ID
1. Message your new bot (send anything)
2. Visit: `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates`
3. Find `"chat":{"id":123456789}` - that's your chat ID
### 3. Configure
```bash ```bash
cp .env.example .env cp .env.example .env
# Edit .env with your credentials # Edit .env with your credentials
```
### 4. Run
```bash
docker compose up -d docker compose up -d
``` ```
### 5. Check Logs ### Local development
```bash ```bash
docker compose logs -f pip install -r requirements.txt
# or playwright install chromium
cat data/monitor.log
export TELEGRAM_BOT_TOKEN=your_token
export TELEGRAM_CHAT_ID=your_chat_id
# ... other env vars
python monitor.py
``` ```
## Telegram Commands
| Command | Description |
|---------|-------------|
| `/autopilot on` | Enable automatic applications |
| `/autopilot off` | Disable automatic applications |
| `/status` | Show current status and application stats |
| `/plot` | Generate weekly listing pattern visualization |
| `/help` | Show available commands |
## Configuration ## Configuration
### Required ### Required environment variables
| Variable | Description | - `TELEGRAM_BOT_TOKEN` - Bot token from @BotFather
|----------|-------------| - `TELEGRAM_CHAT_ID` - Your Telegram chat ID
| `TELEGRAM_BOT_TOKEN` | Telegram bot token from BotFather |
| `TELEGRAM_CHAT_ID` | Your Telegram chat ID |
### Optional - Login ### InBerlin login (required for auto-apply)
| Variable | Description | Default | - `INBERLIN_EMAIL` - Your inberlinwohnen.de email
|----------|-------------|---------| - `INBERLIN_PASSWORD` - Your inberlinwohnen.de password
| `INBERLIN_EMAIL` | inberlinwohnen.de login email | - |
| `INBERLIN_PASSWORD` | inberlinwohnen.de password | - |
| `CHECK_INTERVAL` | Seconds between checks | 300 |
### Optional - Form Data (for Autopilot) ### Form data (for auto-apply)
| Variable | Description | Default | - `FORM_ANREDE` - Salutation (Herr/Frau)
|----------|-------------|---------| - `FORM_VORNAME` - First name
| `FORM_ANREDE` | Salutation (Herr/Frau) | Herr | - `FORM_NACHNAME` - Last name
| `FORM_VORNAME` | First name | - | - `FORM_EMAIL` - Email address
| `FORM_NACHNAME` | Last name | - | - `FORM_PHONE` - Phone number
| `FORM_EMAIL` | Contact email | - | - `FORM_STRASSE` - Street name
| `FORM_PHONE` | Phone number | - | - `FORM_HAUSNUMMER` - House number
| `FORM_STRASSE` | Street name | - | - `FORM_PLZ` - Postal code
| `FORM_HAUSNUMMER` | House number | - | - `FORM_ORT` - City
| `FORM_PLZ` | Postal code | - | - `FORM_PERSONS` - Number of persons in household
| `FORM_ORT` | City | Berlin | - `FORM_CHILDREN` - Number of children
| `FORM_PERSONS` | Number of persons moving in | 1 | - `FORM_INCOME` - Monthly net income
| `FORM_CHILDREN` | Number of children | 0 |
| `FORM_INCOME` | Monthly household net income (€) | - |
### Optional - WGcompany.de Search Filters ### WGcompany filters
| Variable | Description | Default | - `WGCOMPANY_ENABLED` - Enable WGcompany monitoring (true/false)
|----------|-------------|---------| - `WGCOMPANY_MIN_SIZE` - Minimum room size in sqm
| `WGCOMPANY_ENABLED` | Enable WGcompany monitoring | true | - `WGCOMPANY_MAX_SIZE` - Maximum room size in sqm
| `WGCOMPANY_MIN_SIZE` | Minimum room size (m²) | - | - `WGCOMPANY_MIN_PRICE` - Minimum price in EUR
| `WGCOMPANY_MAX_SIZE` | Maximum room size (m²) | - | - `WGCOMPANY_MAX_PRICE` - Maximum price in EUR
| `WGCOMPANY_MIN_PRICE` | Minimum rent (€) | - | - `WGCOMPANY_BEZIRK` - District filter (optional)
| `WGCOMPANY_MAX_PRICE` | Maximum rent (€) | - |
| `WGCOMPANY_BEZIRK` | District code (0=all) | 0 |
## Without Login ## Telegram Commands
If you don't provide login credentials, the monitor will use the public Wohnungsfinder (shows all listings instead of your personalized filtered results). - `/status` - Show current status and recent listings
- `/autopilot` - Toggle auto-apply on/off
- `/listings` - Show current listings
- `/help` - Show available commands
## Data Files ## Data files
All data is stored in the `./data` directory: All data is stored in the `data/` directory:
| File | Description | - `listings.json` - Previously seen inberlinwohnen listings
|------|-------------| - `wgcompany_listings.json` - Previously seen WGcompany listings
| `listings.json` | Known inberlinwohnen listings | - `applications.json` - Application history
| `wgcompany_listings.json` | Known WGcompany listings | - `listing_times.csv` - Time series data for listings
| `state.json` | Monitor state (autopilot on/off) | - `state.json` - Runtime state (autopilot toggle)
| `applications.json` | Record of submitted applications | - `monitor.log` - Application logs
| `listing_times.csv` | InBerlin timing data for pattern analysis |
| `wgcompany_times.csv` | WGcompany timing data | ## Debugging
| `monitor.log` | Application logs |
| `weekly_plot.png` | Generated plot from /plot command | When applications fail, the bot saves:
| `wgcompany_debug.html` | Debug HTML from WGcompany |
| `*.png` | Screenshots from application attempts | - Screenshots to `data/*.png`
- Page HTML to `data/debug_page.html`
Check these files to understand why an application failed.
## License
MIT