summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-05-04 15:14:31 +0200
committerMatthias Schiffer <matthias@gamezock.de>2010-05-04 15:14:31 +0200
commitb5ade70817c48290fdd804664a7003cce877fc12 (patch)
tree64525afd72279c1828f479b95eace9c30d61fa62 /modules
parent7ce3e4c59e5d42a2c625ff9f971f32b168708c94 (diff)
downloadcurunir-b5ade70817c48290fdd804664a7003cce877fc12.tar
curunir-b5ade70817c48290fdd804664a7003cce877fc12.zip
Corrected mensa module for fridays
Diffstat (limited to 'modules')
-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: