-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix dresden parser #90
Conversation
I don't like failing tests...therefore fixed marburg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work! It does look quite good already! But please, don't use exceptions for control flow if not necessary. 😉
I will review the marburg parser separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some minor issues, but overall this also looks very good! I did not add comments for "exception as control flow", but there are definitely 5 too many AttributeError
s in this parser. 😉
I also notices, that the side dishes are sometimes formatted strangely, eg:
<span class="neo-menu-single-title">
, Schokoladenpudding mit Vanillesauce (<abbr title="Milch"><abbr title="Milch"><abbr title="Milch">22</abbr></abbr></abbr>) , Joghurtdessert (<abbr title="Milch"><abbr title="Milch"><abbr title="Milch">22</abbr></abbr></abbr>) ,Waldbeeren-Sahnequark (<abbr title="Milch"><abbr title="Milch"><abbr title="Milch">22</abbr></abbr></abbr>) </span>
Which results in:
<category name="Beilagen: Dessert">
<meal>
<name>, Schokoladenpudding mit Vanillesauce , Joghurtdessert ,Waldbeeren-Sahnequark </name>
<note>Milch</note>
</meal>
</category>
Ideally, we would want something like Schokoladenpudding mit Vanillesauce, Joghurtdessert, Waldbeeren-Sahnequark
, so maybe strip(", ") and then re.sub(r'\s*,\s*', ", ", name)
? We can also add this later.
Thanks! I squashed the commits into one for each parser and merged them. There seems to be a problem with hannover (I will take a look at it) and #89 is still a problem, so it might take a while before the changes are visible unfortunately. |
So, hannover is fixed and I now host the parsers myself. So dresden and marburg should start working again tomorrow. |
Studentenwerk Dresden launched a redesign of their webpage, thus the parser was not working anymore.