diff --git a/linkcheck/bookmarks/firefox.py b/linkcheck/bookmarks/firefox.py index 2e95a1fb..a54f89df 100644 --- a/linkcheck/bookmarks/firefox.py +++ b/linkcheck/bookmarks/firefox.py @@ -25,7 +25,7 @@ except ImportError: has_sqlite = False -extension = re.compile(r'/(?i)places.sqlite$') +extension = re.compile(r'/places.sqlite$', re.IGNORECASE) # Windows filename encoding diff --git a/linkcheck/mimeutil.py b/linkcheck/mimeutil.py index 19f711c3..672f760a 100644 --- a/linkcheck/mimeutil.py +++ b/linkcheck/mimeutil.py @@ -52,12 +52,12 @@ def add_mimetype(mimedb, mimetype, extension): # if file extension lookup was unsuccessful, look at the content PARSE_CONTENTS = { - "text/html": re.compile(r'^(?i)<(!DOCTYPE html|html|head|title)'), + "text/html": re.compile(r'^<(!DOCTYPE html|html|head|title)', re.IGNORECASE), "text/plain+opera": re.compile(r'^Opera Hotlist'), "text/plain+chromium": re.compile(r'^{\s*"checksum":'), - "text/plain+linkchecker": re.compile(r'(?i)^# LinkChecker URL list'), + "text/plain+linkchecker": re.compile(r'^# LinkChecker URL list', re.IGNORECASE), "application/xml+sitemapindex": re.compile(r'(?i)<\?xml[^<]+