Closed BenediktCleff closed 5 years ago
Yeah! Thanks for adding Bellewaerde!
You can try with desktop headers in your http request?
That's awesome. Thank you for your contribution :)
I'd like to solve opening hours before merging in, I'm sure it will be something weird but simple.
You can try with desktop headers in your http request?
I've tried using the same user agent my browser is sending, when making the request but it didn't work.
I've got it working by using the build in https module. Not as generic as I wished it would be, but for now it should work as expected.
Sorry for the confusing commit message. It should be better called "opening times Bellewaerde".
Sorry for the delay in looking at this! I'm getting married in a few days and then off on a long honeymoon, so a bit busy but wanted to get this done before I vanished for a little while :)
Looks great, many thanks for this!! I fixed the HTTP request, I passed the GET params to needle by using the "data" property, and it all seemed to work.
The "npm run build" was failing because of case-sensitivity of one of the requires. We're backwards compiling for older version of NodeJS at the moment (this will go away when we hit 5.0).
Published in 4.8.0! Feels like a good time to bump the version a little with a new shiny park.
Adding waittimes support for Bellewaerde as requested in #117.
Unfortunately I couldn't get the openings times yet, but I thought maybe someone could help me out with this, before it is merged into the repository:
Calling https://www.bellewaerde.be/en/api/calendar/2019 in the browser will return a JSON, while calling it through this.HTTP returns a html string like this:
<body>Redirecting to <a href="https://www.bellewaerde.be/en/api/calendar/2019">https://www.bellewaerde.be/en/api/calendar/2019</a>.</body>
Looking forward to get some hints on how I can fix this.