feat: automate session cookie retrieval and remove manual session ID setup

This commit is contained in:
Elmar Kresse
2025-08-15 15:06:52 +02:00
parent 78152dafc0
commit 2c8cea7645
4 changed files with 57 additions and 58 deletions

View File

@@ -37,8 +37,7 @@ You can run the bot natively on your machine or use a Docker image. The requirem
### 1. Environment Setup
Ensure that the `.env` file is configured correctly. An example is available in the `sample.env` file. Copy it to `.env` and fill in the required values.
The `SAP_SESSIONID` and `COOKIE_SESSSION` are obtained after performing a search on the LWB website. Use your browser's developer tools to locate them in local storage.
*Future versions will include automatic form processing to obtain a valid session ID.*
You no longer need to set `SAP_SESSIONID` or `COOKIE_SESSION` manually. The scraper opens the LWB portal with a headless browser, clicks “Ich suche eine Wohnung”, opens “Immobiliensuche” → “MEHR ANZEIGEN”, sets the maximum results to 1000, clicks “Suchen”, and extracts session cookies automatically.
### 2. Python Environment