/wbmbot_v2

WBMBOT_v2 is a Selenium-based Python bot designed to automate the application process for new flats listed by WBM Wohnungsbaugesellschaft Berlin-Mitte GmbH. It prioritizes speed and efficiency to ensure your application is among the first 1000 considered in the random selection process for apartment viewings.

Primary LanguageHTMLMIT LicenseMIT

WBMBOT_v2

An improved work-in-progress (WIP) and fully refactored version of the original WBMBOT by David Fischer.

WBMBOT_v2 is a Selenium-based Python bot designed to automate the application process for new flats listed by WBM Wohnungsbaugesellschaft Berlin-Mitte GmbH. It prioritizes speed and efficiency to ensure your application is among the first 1000 considered in the random selection process for apartment viewings.

Prerequisites

  • Python 3.10 or higher

Installation

To set up your environment and install the required dependencies, run the following command:

pip install -r requirements.txt

Quick Start

To launch the bot, navigate to the project directory and execute:

python3 wbmbot_v2/main.py

On the first run, the bot will guide you through a setup process to gather necessary information for applications on wbm.de. This data will be stored in a local configs/wbm_config.json file in a human-readable format.

Security Notice: The information is saved unencrypted. Ensure the security of your configs/wbm_config.json file.

Alternatively, you can manually create the configs/wbm_config.json file with the following structure:

Configuration File Example

{
    "first_name": "JOHN",
    "last_name": "DOE",
    "emails": [
        "XXX@protonmail.com",
        "YYY@protonmail.com"
    ],
    "street": "Doner-Str. 123",
    "zip_code": "12345",
    "city": "Berlin",
    "phone": "4911223344",
    "wbs": "yes",
    "wbs_date": "23/04/1972",
    "wbs_num": "WBS 160",
    "wbs_rooms": "2",
    "filter": ["wbm", "3 zimmer"]
}

Command-Line Interface

usage: main.py [-i INTERVAL] [-H] [-t]

Automates the application process for flats on the 'WBM Angebote' page, respecting user-defined exclusion filters.

options:
  -h, --help            Show this help message and exit.
  -i INTERVAL, --interval INTERVAL
                        Set the refresh interval in 'minutes' for checking new flats on wbm.de. [default: 3 minutes]
  -H, --headless_off    Disable headless mode. The bot will run in a visible browser window.
  -t, --test            Perform a test run using test data. Does not connect to wbm.de.

Filtering Strategy

The filter list is designed to exclude listings based on specified keywords. Simply add your exclusion keywords to the list.

Logging

Successful applications are recorded in logging/successful_applications.txt.

Important: This log prevents reapplication to the same flats. Do not delete it unless you intend to reapply to all available flats.

Additional Information

During setup, you can provide multiple email addresses. The bot will apply to each flat once per email address. By default, the bot refreshes wbm.de every 3 minutes to check for new listings.

As of now, there are no timeouts, bot checks, or captchas on the website (which we hope remains the case). However, given the limited number of flats available, frequent checks are not deemed necessary compared to platforms like immoscout24.

Embark on your apartment hunt with WBMBOT_v2. Good luck!

TODO

  • Change "successful_applications.txt" to JSON type
  • Add support for multi user wbm_config files
  • Fix test-data
  • Make a portable docker image of the bot that can be hosted anywhere
  • Add "excluded_applications.json" that shows all applications that were excluded by the filter
  • Add color_printer class into the works with the logger
  • Notify via e-mail whenever the bot applies to an application
  • Download the viewing of an apartment as a PDF (Available on WBM) for records keeping
  • Automatically detect if internet network connection is down and pause/restart once back