summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-02-08 23:44:06 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-02-08 23:44:06 +0100
commitb414e5f1ca9738634ce93111bb95dff348ee7e36 (patch)
tree42ba8e63daffee4d6cddfc092a81c6d01ec3bebc
parent9ead5a211c9fb2f5d0239798c6c575e7d130ed3e (diff)
downloadcurunir-b414e5f1ca9738634ce93111bb95dff348ee7e36.tar
curunir-b414e5f1ca9738634ce93111bb95dff348ee7e36.zip
mensa: Ignore case in regex
-rw-r--r--modules/mensa.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mensa.py b/modules/mensa.py
index 3c3a197..d86183a 100644
--- a/modules/mensa.py
+++ b/modules/mensa.py
@@ -32,8 +32,8 @@ class Module(ModuleBase):
return
def handle_data(data):
- r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>.*?<tr[^>]*>(.*?)</tr>', re.DOTALL)
- r2 = re.compile(r'.*?<td[^>]*>(.*?)</td>', re.DOTALL)
+ r = re.compile(r'.*?<tr[^>]*>(.*?)</tr>.*?<tr[^>]*>(.*?)</tr>', re.DOTALL|re.IGNORECASE)
+ r2 = re.compile(r'.*?<td[^>]*>(.*?)</td>', re.DOTALL|re.IGNORECASE)
def handle_data_row(data, pos):
match = r.match(data, pos)
@@ -59,7 +59,7 @@ class Module(ModuleBase):
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:
return False