whchien / funda-scraper

FundaScaper scrapes data from Funda, the Dutch housing website. You can find listings from house-buying or rental market, and historical data. 🏡
GNU General Public License v3.0
113 stars 53 forks source link

Methods to determine listing date #53

Open DannyJanmaat opened 2 months ago

DannyJanmaat commented 2 months ago

'Note: Information regarding listing dates is no longer available since Q4 2023. Funda requires users to log in to see this information.'

There are 2 simple methods :

1 less accurate method : Scrape the last-modified date from the uploaded pictures, compare them and take the oldest date. (invoke-webrequest "https://cloud.funda.nl/valentina_media/195/420/931_180x120.jpg").Headers.'Last-Modified'

Other method : Without logging in the date can be found in the source code; "Aangeboden sinds"

lethuan007 commented 1 month ago

There probably is an easier way, by using the new api, the new api seems to work without logging in. The get-request would look something like this https://[listing-detail-page.funda.io/api/v1/listing/nl/*******](https://listing-detail-page.funda.io/api/v1/listing/nl/***) where **** is the 'global id'. This is retrieved from the script-tag containing "window.NUXT".

In the JSON that is returned there is a "Listed Since" key, that lists the date. I'm currently working on an update for myself, if I find out how github works I might add this to the project.