This script scrapes property listings from Funda based on a specified funda URL and sends new listings to a Discord channel via a webhook. It's designed to run periodically, checking for new listings and notifying you when they appear. It is not designed to have no bugs. Always make sure to use this within the limitations of Funda's Terms and Conditions.
-
Clone this repository:
git clone https://github.com/savdbroek/wonky-funda-scraper.git
-
Navigate to the project directory:
cd wonky-funda-scraper
-
Install the required Python packages:
pip install -r requirements.txt
-
Download the appropriate ChromeDriver for your version of Chrome and place it in the project directory or in your system's PATH.
- Navigate to (https://funda.nl)
- Enter any search query you like (pro tip, include a radius for the search).
- Click search.
- Add any filters you need.
- Finally add the filter to only show houses that have been posted in the last 24-hours.
- When you are happy with your search result, copy the full URL and place it within the correct variable in the script. e.g.
URL = "https://www.funda.nl/zoeken/koop/?selected_area=%5B%22zwolle%22%5D"
- Go to your Discord server settings.
- Navigate to the
Integrations
tab. - Click on
Webhooks
and thenNew Webhook
. - Set up the name, channel where messages will be sent, and copy the Webhook URL.
- Replace the
WEBHOOK_URL
value in the script with your copied Webhook URL.
- Go to your Discord settings.
- Under the
Appearance
tab, enableDeveloper Mode
. - Right-click on any user in your server and select
Copy ID
. - Replace the user IDs in the script with the copied IDs to tag these users in the notification.
- Open
Task Scheduler
from the Start menu. - In the Actions pane, click
Create Basic Task
. - Name your task and provide a description if desired.
- Check the box "run whether user is logged on or not" to hide the Command Prompt.
- Choose the
Trigger
, for example every 30 minutes. - In the
Action
step, selectStart a program
. - Browse and select your Python executable path (e.g., C:/Users/USER/AppData/Local/Programs/Python/Python39/python.exe).
- In the
Add arguments
field, input the path to the script, e.g., C:/projects/wonky-funda-scraper/main.py. - Finish the setup and your script will run at the specified intervals.
Once everything is set up and the task is scheduled, the script will run automatically at the specified intervals. When new listings are found, they will be sent to the specified Discord channel, tagging the specified users.