mensa: Ignore case in regex
This commit is contained in:
parent
9ead5a211c
commit
b414e5f1ca
1 changed files with 3 additions and 3 deletions
|
@ -32,8 +32,8 @@ class Module(ModuleBase):
|
||||||
return
|
return
|
||||||
|
|
||||||
def handle_data(data):
|
def handle_data(data):
|
||||||
r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>.*?<tr[^>]*>(.*?)</tr>', re.DOTALL)
|
r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>.*?<tr[^>]*>(.*?)</tr>', re.DOTALL|re.IGNORECASE)
|
||||||
r2 = re.compile(r'.*?<td[^>]*>(.*?)</td>', re.DOTALL)
|
r2 = re.compile(r'.*?<td[^>]*>(.*?)</td>', re.DOTALL|re.IGNORECASE)
|
||||||
|
|
||||||
def handle_data_row(data, pos):
|
def handle_data_row(data, pos):
|
||||||
match = r.match(data, pos)
|
match = r.match(data, pos)
|
||||||
|
@ -59,7 +59,7 @@ class Module(ModuleBase):
|
||||||
return (ret, match.end())
|
return (ret, match.end())
|
||||||
|
|
||||||
|
|
||||||
match = re.compile(r'^.*?<table[^>]*>.*?<td[^>]*>.*?(\d+)\.(\d+)\. - \d+\.\d+\.(\d+).*?</td>.*?<td[^>]*>Freitag</td>\s*</tr>(.*?)</table>.*$', re.DOTALL).match(data)
|
match = re.compile(r'^.*?<table[^>]*>.*?<td[^>]*>.*?(\d+)\.(\d+)\. - \d+\.\d+\.(\d+).*?</td>.*?<td[^>]*>Freitag</td>\s*</tr>(.*?)</table>.*$', re.DOTALL|re.IGNORECASE).match(data)
|
||||||
|
|
||||||
if not match:
|
if not match:
|
||||||
return False
|
return False
|
||||||
|
|
Reference in a new issue