A nodejs script for scrapping and the reservation of rooms or flats in the Wg-gesucht site.
$ npm install
$ cp .env.example .env
In order to use the script you will need to apply your credentials and template messages in the generated .env file:
WG_USER= YOUR-USERNAME
WG_PASSWORD= YOUR-PASSWORD
The script detects the language of the ad (German or English) so you will have to provide the message template id of your Germand and English version.
If you wish to use only one language you can use the same id for both languages.
Log in into your wg-account and go into your Message templates). Create an english and german version of your desired message and copy the template id, it should be on the top of the address:
https://www.wg-gesucht.de/en/message-template.html?template_id=YOUR-MESSAGE-ID
Copy the id to the .env file
MESSAGE_ENG=YOUR-MESSAGE-ID
MESSAGE_GER=YOUR-MESSAGE-ID
You can either use an existing custom saved filter or use the url generated after a search applying the filters you want. Both of them should have a format similar to:
Once you have your filter url apply it into the .env file
FILTER_URL=YOUR FILTER URL
Run the script
$ node app.js
Use a raspberry pi or a free vm in order to have it running 24 hours.
- Autodiscovery of new rooms or flats every 5 minutes.
- Ad Language detection
- Autosend messages to owners every 5 minutes