jeroentvb / wind-scrape

Node package for scraping wind forecast from a few websites
GNU General Public License v3.0
30 stars 4 forks source link

Scrape Windfinder Report #10

Closed FutureCow closed 5 years ago

FutureCow commented 5 years ago

Hello,

Thank you very much for the nice scarping tool. After closing the Weather Underground API, I was looking for a way to get winddata into my domotica system. This looks very promosing. But i'm not only interested in forecaust data, bit also in wind report. Will is be possible to scrape the report data from windfinder:

https://nl.windfinder.com/report/veluwemeer

jeroentvb commented 5 years ago

Sorry for the late reply, I somehow didn't get a notification..

I was actually looking into this about 2 weeks ago but it's pretty difficult to achieve since the graph is a highchart graph (which is essentially an svg), and it only shows the tooltip data on hover. I don't think it's impossible but just difficult and I need more time to look into it.

jeroentvb commented 5 years ago

So I did some digging and found that the data is pulled from the windfinder API which returns the data as JSON. If the page is opened with puppeteer I can just pull the response from it. It still needs to be done with a headless browser because the url includes a token which changes every day.

FutureCow commented 5 years ago

This is a very nice solution! Thank you so much. Now trying to get the information inside my domotica.