This was one of my first projects. I know there is a lot of redundancy and the code and runtime could be improved for sure, but I think you can use the code as a good basis for your own project if you plan to write a crawler for https://www.immobilienscout24.de/.
It is important to pass the cookie "reese84" (which you get by manually going to the website yourself and copying it). Otherwise Immoscout will notice that you are a robot. This cookie must be updated from time to time. I know you could counteract this by always changing the proxy, but at that time I didn't have the money for my own proxies :).
For the people who are asking themselves Immscout24 has no API? Yes it does, but the price is 900€ per month for 10.000 API calls. ( I know this because I made a request for an API key at that time )