Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erlangen-Nuernberg not all Menus displayed #101

Open
cs8898 opened this issue Oct 11, 2019 · 12 comments
Open

Erlangen-Nuernberg not all Menus displayed #101

cs8898 opened this issue Oct 11, 2019 · 12 comments

Comments

@cs8898
Copy link

cs8898 commented Oct 11, 2019

I got something interesting...
It seems that sometimes a menu gets dropped...

Is there a way to get the Output XML Feed for further Investigation?
(The Following is Related to THI, but should affect all SW-Erlangen-Nuernberg canteens)
I compared the Original Page SW Erlangen/Mensa THI

With the used XML feed used by the Parser INFO-MAX XML Feed

The Problematic Item:

<item>
    <category>Essen 3</category>
    <title>Hähnchenstreifen in süß-saurer Soße (Sel,Sen) mit Reis</title>
    <description/>
    <beilagen/>
    <preis1>2,00</preis1>
    <preis2>3,00</preis2>
    <preis3>4,00</preis3>
    <einheit/>
    <piktogramme>
        <img src='http://www.max-manager.de/daten-extern/sw-erlangen-nuernberg/icons/G.png?ts=1570784103' class='infomax-food-icon G' width='50' height='50' alt='food-icon'>
    </piktogramme>
    <foto/>
</item>

The API Out of OpenMensa was
JSON API CALL

[
    {
        "id": 4594985,
        "name": "Blumenkohl-Broccoli-Auflauf  mit Bechamelsauce ",
        "category": "Vegetarisch",
        "prices": {
            "students": 2.09,
            "employees": 3.3,
            "pupils": null,
            "others": 4.18
        },
        "notes": [
            "mit Milch/Laktose",
            "mit Weizen",
            "mit Milch/Laktose",
            "mit Eier"
        ]
    },
    {
        "id": 4564077,
        "name": "Kaiserschmarrn mit Mandeln und Rosinen  mit Apfelmus ",
        "category": "Vegetarisch",
        "prices": {
            "students": 2.19,
            "employees": 3.3,
            "pupils": null,
            "others": 4.38
        },
        "notes": [
            "mit Mandeln",
            "mit Milch/Laktose",
            "mit Eier",
            "mit Weizen"
        ]
    },
    {
        "id": 4564078,
        "name": "Pasta  Napoli ",
        "category": "Vegetarisch",
        "prices": {
            "students": 1.75,
            "employees": 3.3,
            "pupils": null,
            "others": 3.5
        },
        "notes": [
            "mit Weizen",
            "mit Weizen"
        ]
    },
    {
        "id": 4564075,
        "name": "Schwarzbierpfanne vom Rind  mit Sp\u00e4tzle ",
        "category": "Rind",
        "prices": {
            "students": 3.27,
            "employees": 4.27,
            "pupils": null,
            "others": 6.54
        },
        "notes": [
            "mit Eier",
            "mit Weizen",
            "mit undefinierter Chemikalie Ge",
            "mit Milch/Laktose"
        ]
    },
    {
        "id": 4564076,
        "name": "MSC - Hoki-Filet paniert mit Zitrone  und Remouladenso\u00dfe ",
        "category": "Fisch MSC Fisch",
        "prices": {
            "students": 2.42,
            "employees": 3.42,
            "pupils": null,
            "others": 4.84
        },
        "notes": [
            "mit Milch/Laktose",
            "mit Eier",
            "mit Weizen",
            "mit Weizen"
        ]
    }
]

As you can see the above XML excerpt is missing...

At the beginning of the week the missing Objekt was one of the "Aktions Essen"
But Today it was available...

As you can see its not about Character Encodings,
I actually can't find the Problem in the current code... erlangen_nuernberg.py

@j-maas
Copy link
Collaborator

j-maas commented Oct 11, 2019

If you want to test the parser, you can clone the repo and run it locally on your computer, following the instructions from the README. Then you can also play around with the code and maybe put together a PR.

I hope this answers your question.

@klemens
Copy link
Collaborator

klemens commented Oct 11, 2019

You can find the full feed here: https://omfeeds.crpt.de/erlangen_nuernberg/ingolstadt/full.xml (or better follow @y0hy0h's advice 😉). There is also an index of all canteens of the parser.

CC @theScrabi, who wrote the parser. I can also look into this if you want.

@cs8898
Copy link
Author

cs8898 commented Oct 11, 2019

Ok the omfeeds.crpt.de can't be the correct one

It only lists 3 meals.
Is there a way to get the origin feed location used by openMensa (the ID for THI is 272)

Fish, Kaiserschmarrn and Pasta

But i will test the parser locally

@cs8898
Copy link
Author

cs8898 commented Oct 11, 2019

Ok the Feed URL Really can't be the correct one

<day date="2019-10-10">
    <category name="Schwein">
        <meal>
            <name>Hirtenrolle  mit Tomaten - Basilikum - So&#xDF;e  und Reis</name>
            <note>mit Weizen</note>
            <note>mit Eier</note>
            <note>mit Soja</note>
            <note>mit Milch/Laktose</note>
            <note>mit Weizen</note>
            <note>mit Milch/Laktose</note>
            <note>mit Sellerie</note>
            <price role="student">2.29</price>
            <price role="employee">3.30</price>
            <price role="other">4.58</price>
        </meal>
    </category>
    <category name="Rind Vegetarisch">
        <meal>
            <name>SB-THEKE: Kalbsragout in Rieslingso&#xDF;e mit gebratenen Pilzen und Bandnudeln </name>
            <note>mit Weizen</note>
            <note>mit Milch/Laktose</note>
            <note>mit Schwefeldioxid/Sulfite</note>
            <price role="student">3.55</price>
            <price role="employee">4.55</price>
            <price role="other">7.10</price>
        </meal>
    </category>
    <category name="Sonstiges">
        <meal>
            <name>Bunte vegane Gnocchi mit Schwarzwurzeln, Karotten und Bohnen </name>
            <note>mit Weizen</note>
            <note>mit Soja</note>
            <price role="student">2.27</price>
            <price role="employee">3.30</price>
            <price role="other">4.54</price>
        </meal>
    </category>
</day>

While The API gives me

[
    {
        "id": 4594984,
        "name": "Schweinesteak Alg\u00e4uer Art  Sp\u00e4tzle  Rahmso\u00dfe ",
        "category": "Schwein",
        "prices": {
            "students": null,
            "employees": null,
            "pupils": null,
            "others": null
        },
        "notes": [
            "mit undefinierter Chemikalie Ge",
            "mit Sellerie",
            "mit Milch/Laktose",
            "mit Weizen",
            "mit Eier",
            "mit Weizen",
            "mit Weizen"
        ]
    },
    {
        "id": 4564072,
        "name": "Hirtenrolle  mit Tomaten - Basilikum - So\u00dfe  und Reis",
        "category": "Schwein",
        "prices": {
            "students": 2.29,
            "employees": 3.3,
            "pupils": null,
            "others": 4.58
        },
        "notes": [
            "mit Sellerie",
            "mit Milch/Laktose",
            "mit Weizen",
            "mit Milch/Laktose",
            "mit Soja",
            "mit Eier",
            "mit Weizen"
        ]
    },
    {
        "id": 4564073,
        "name": "Kalbsragout in Rieslingso\u00dfe mit gebratenen Pilzen und Bandnudeln ",
        "category": "Rind Vegetarisch",
        "prices": {
            "students": 3.55,
            "employees": 4.55,
            "pupils": null,
            "others": 7.1
        },
        "notes": [
            "mit Schwefeldioxid/Sulfite",
            "mit Milch/Laktose",
            "mit Weizen"
        ]
    },
    {
        "id": 4564074,
        "name": "bunte vegane Gnocchi mit Schwarzwurzeln, Karotten und Bohnen ",
        "category": "Sonstiges",
        "prices": {
            "students": 2.27,
            "employees": 3.3,
            "pupils": null,
            "others": 4.54
        },
        "notes": [
            "mit Soja",
            "mit Weizen"
        ]
    }
]

The Feed contains "SB-THEKE: " and "Bunte vegane Gnocchi" is written in capital

@cs8898
Copy link
Author

cs8898 commented Oct 11, 2019

Sorry for Spamming this...

Seems that also the Max-Manager XML skips meals...
I will create some monitoring scripts to download the next weeks, and check the differences day for day, original vs various XMLs and OpenMensa API Responses

@j-maas
Copy link
Collaborator

j-maas commented Oct 12, 2019

Yes, this might be a caching issue. As far as I remember, the parsers are run daily. So if the menu changes inbetween runs, the feed might diverge. This looks like a tough issue to debug...

@klemens
Copy link
Collaborator

klemens commented Oct 13, 2019

As far as I remember, the parsers are run daily

Yes, "Cafeteria Ingolstadt full" is currently run once a day at 8:00 and it is the only feed for canteen 272.

@theScrabi
Copy link
Collaborator

Wait im getting daily error messages via mail, but could not fix them yet. If you want I can post the next one here.

@theScrabi
Copy link
Collaborator

In den letzten 24 Stunden sind folgende Unregelmäßigkeiten aufgetretten.
Mehr Information finden Sie unter:
http://openmensa.org/parsers/41

  • Die Feed-Daten konnten nicht abgerufen werden: 404 - 404 Not Found

Die vollständige Liste mit Mitteilungen finden Sie unter:
http://openmensa.org/parsers/41

@klemens
Copy link
Collaborator

klemens commented Oct 14, 2019

@theScrabi: That might be because the index url pointed to the non-existing https://github.com/theScrabi/openmensa-parsers/wiki/Unterst%C3%BCtzte-Mensen. I have removed it for now. The parsers themselves look fine.

@TheTastyHanuta
Copy link

Hi, I was just wondering if there is a fix for the problem? I noticed some meals missing or the wrong ones being returned by openmensa. I tried to change the time I make the request but it still sometimes is not 100% correct. I just compared the openmensa data with the one from the max-manager url used the parser and they are different. One meal is missing.

@theScrabi
Copy link
Collaborator

@TheTastyHanuta just notifying. I'm not studying anymore, and I have little time now. So if there is no one else contributing to this extractor, the extractor unmaintained and its development stalled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants