mswart / openmensa-parsers

A collection of openmensa.org parsers with feed v2 generator
36 stars 45 forks source link

Erlangen-Nuernberg not all Menus displayed #101

Open cs8898 opened 5 years ago

cs8898 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

You can find the full feed here: https://omfeeds.crpt.de/erlangen_nuernberg/ingolstadt/full.xml (or better follow @Y0hy0h's advice :wink:). 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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

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

klemens commented 5 years ago

@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.