eat-api icon indicating copy to clipboard operation
eat-api copied to clipboard

German Dish fetching is broken

Open Friendly-Banana opened this issue 1 year ago • 1 comments

The german detail pages are broken

ARRAY(0x55b990b4bb10)

resulting in empty API responses. The english version still works for some reason

Friendly-Banana avatar Aug 02 '24 20:08 Friendly-Banana

Has been reported Upstream, I don't see a fix on our side until StuWerk IT fixes this

Lieber Herr Elsinga,

danke für den Hinweis. Wir gehen der Sache nach. Aktuell arbeiten wir an unserem Kennzeichnungssystem. Es kann also zu Störungen kommen. https://www.studierendenwerk-muenchen-oberbayern.de/mensa/speiseplan/speiseplan_421_-de.html#heute

Diese URL geht

CommanderStorm avatar Aug 04 '24 17:08 CommanderStorm

We could maybe parse the weekly menu from that URL 🤔

Friendly-Banana avatar Aug 21 '24 09:08 Friendly-Banana

https://www.mensaplan.de/garching/mensa-garching/index.html

Interestingly enough this website has no issues displaying the meal plan whatsoever. Without any knowledge about the code base - is there anything we can do on our side? Would be great if we are up and running at the beginning of the new semester 🙂 thank you guys!

jakobkoerber avatar Sep 10 '24 07:09 jakobkoerber

Well I for my part, being impatient, started to crawl the current meal plan from the overview page which shows the meal plan of the whole month (not a particular day). Maybe that is what this website is doing (but of course I don't know the codebase either).

atticus-sullivan avatar Sep 10 '24 07:09 atticus-sullivan

This codebase currently crawls only the broken daily pages, it should be fairly easy to just point it at the monthly page and extract multiple days at once. @jakobkoerber if you're interested in contributing, StudentenwerkMenuParser would need to be changed.

Friendly-Banana avatar Sep 11 '24 06:09 Friendly-Banana

I created a draft PR #263 that uses the overview page instead of the detail pages in the StudentenWerkMenuParser. Since I am not really familiar with Python nor have the capacity to adjust the tests since I'm also developing for the TCA, it would be great if someone could support me with the development 😄

jakobkoerber avatar Sep 11 '24 18:09 jakobkoerber

@jakobkoerber I've fixed the tests and linting issues in my fork.

Friendly-Banana avatar Sep 19 '24 21:09 Friendly-Banana

@jakobkoerber I've fixed the tests and linting issues in my fork.

Nice, thank you! 😄

jakobkoerber avatar Sep 20 '24 03:09 jakobkoerber

@Friendly-Banana only additional question I have: wouldn't we need to change the assets of the test? They look like the daily pages not the overview we are using now 🤔

jakobkoerber avatar Sep 20 '24 06:09 jakobkoerber

The test has both, the individual menu parsing with daily menus and the overview (src/test/assets/studentenwerk/mensa-garching/for-generation/overview.html)

Friendly-Banana avatar Sep 20 '24 15:09 Friendly-Banana