Corrected mensa module for fridays
This commit is contained in:
parent
7ce3e4c59e
commit
b5ade70817
1 changed files with 4 additions and 2 deletions
|
@ -36,11 +36,13 @@ class Module(ModuleBase):
|
||||||
if not re.search(datestr, data):
|
if not re.search(datestr, data):
|
||||||
return False
|
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
|
return False
|
||||||
|
|
||||||
|
data = match.group(1)
|
||||||
|
|
||||||
r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>', re.DOTALL)
|
r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>', re.DOTALL)
|
||||||
match = r.match(data)
|
match = r.match(data)
|
||||||
if not match:
|
if not match:
|
||||||
|
|
Reference in a new issue