Closed adi64 closed 11 months ago
The main content can be retrieved like this:
curl 'https://swp.webspeiseplan.de/index.php?token=55ed21609e26bbf68ba2b19390bf7961&model=menu&location=9603&languagetype=1' -H 'Referer: https://swp.webspeiseplan.de/Menu'
Referer is important, otherwise the result is empty.
The token is currently hardcoded in the main.*.js
.
Hello @adi64 👋 Thanks for raising the issue, and sorry for the late reply - I'm still trailing a bit behind on my emails after my vacation.
Please feel free to take a stab at an implementation, I'd gladly review it and trigger deployment once ready. So anything goes, we could scrape off webspeiseplan.de, or go with the semi-official API from #16, it still seems to be a thing. Whatever fits the bill best ;)
I'll be happy to see a PR flying by!
Hello @adi64 are you on the topic? If you cannot find the time, could you send another student my way which might take up the project? Thanks!
Hey, sorry for the late response. As this is a completely different API, I didn't feel like going for it (until now). I now have a somewhat working implementation, see here: https://github.com/adi64/om-parser-webspeiseplan. Also, this thing theoretically works for all other canteens using Webspeiseplan, that's why I changed the repo name. As an example, I added https://iph.webspeiseplan.de/menu (completely unrelated, I just found it online).
It's still WIP though. Some points include
mitarbeiterpreisDecimal2
is for students, price3Decimal2
is for employees, and gaestepreisDecimal2
is for guests. This would probably need to be configurable.I think it could be cool to get this thing productive as early as possible and then refine and add features iteratively. What do you think?
@adi64 I am sorry for the late response - feel free to ping if I fall silent for longer. We received another PR #21, I think it's already in good shape. Let's focus on getting something working again - do you think you could base your efforts on that contribution, and tweak & refine in a "step two"?
Fixed with #21. If there is more, I'll look into working on the current state :)
The Studentenwerk seems to be switching to webspeiseplan.de (https://swp.webspeiseplan.de/Menu). So far e.g. Griebnitzsee still uses the "old" page, but e.g. Filmuniversität uses the new one.
Are you interested in building a new integration? Otherwise I might look into it :)