Skip to content

juancruzmartino/wg-gesucht-scrapper-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WG Gesucht Scrapper

A firebase function for the scrapping and reservation of rooms or flats in the Wg-gesucht site. Based on the original scrapping nodejs script.

Instalation

$ cd functions
$ npm install

Configuration

Credentials

In order to use the script you will need to apply your credentials inside the function

WG_USER= YOUR-USERNAME
WG_PASSWORD= YOUR-PASSWORD

Language

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

Filter

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:

https://www.wg-gesucht.de/en/wg-zimmer-in-Berlin.8.0.1.0.html?offer_filter=1&noDeact=1&city_id=8&category=0&rent_type=0&rMax=450

Once you have your filter url apply it into the .env file

FILTER_URL=YOUR FILTER URL

Usage

Deploy the function into your firebae project

$ firebase deploy --project wg-scrapper-test

Once deployed make a POST request to your project function:

Crawl

POST https://{{YOUR-PROJECT-URL}}/crawl

Autoreserve

POST https://{{YOUR-PROJECT-URL}}/autoreserve

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published