mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-11 01:50:59 +00:00
Merge pull request #257 from cjmayo/startexp
Replace deprecated regexp flags not at start
This commit is contained in:
commit
d022ad49ac
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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[^<]+<sitemapindex\s+'),
|
||||
"application/xml+sitemap": re.compile(r'(?i)<\?xml[^<]+<urlset\s+'),
|
||||
"application/xml+sitemap": re.compile(r'<\?xml[^<]+<urlset\s+', re.IGNORECASE),
|
||||
}
|
||||
|
||||
def guess_mimetype (filename, read=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue