diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-08 23:44:06 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-02-08 23:44:06 +0100 |
commit | b414e5f1ca9738634ce93111bb95dff348ee7e36 (patch) | |
tree | 42ba8e63daffee4d6cddfc092a81c6d01ec3bebc /modules | |
parent | 9ead5a211c9fb2f5d0239798c6c575e7d130ed3e (diff) | |
download | curunir-b414e5f1ca9738634ce93111bb95dff348ee7e36.tar curunir-b414e5f1ca9738634ce93111bb95dff348ee7e36.zip |
mensa: Ignore case in regex
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mensa.py | 6 |
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 |