From b5ade70817c48290fdd804664a7003cce877fc12 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 4 May 2010 15:14:31 +0200 Subject: Corrected mensa module for fridays --- modules/mensa.py | 6 ++++-- 1 file 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'(.*?)
.*$', re.DOTALL).subn(r'\1', data) + match = re.compile(r'^.*' + datestr + r'(.*?)(?:
|).*$', re.DOTALL).match(data) - if count < 1: + if not match: return False + data = match.group(1) + r = re.compile(r'.*?]*>(.*?)', re.DOTALL) match = r.match(data) if not match: -- cgit v1.2.3