summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/mensa.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/mensa.py b/modules/mensa.py
index 40c63fa..32c9ee9 100644
--- a/modules/mensa.py
+++ b/modules/mensa.py
@@ -36,11 +36,13 @@ class Module(ModuleBase):
if not re.search(datestr, data):
return False
- (data, count) = re.compile(r'^.*' + datestr + r'(.*?)<td rowspan="3" class="schrift_fett"><div>.*$', re.DOTALL).subn(r'\1', data)
+ match = re.compile(r'^.*' + datestr + r'(.*?)(?:<td rowspan="3" class="schrift_fett"><div>|</table>).*$', re.DOTALL).match(data)
- if count < 1:
+ if not match:
return False
+ data = match.group(1)
+
r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>', re.DOTALL)
match = r.match(data)
if not match: