Skip to content

Commit 4797970

Browse files
alexbenjaminp
authored andcommitted
Use raw string literals. (#105)
1 parent b443ed3 commit 4797970

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

check_https.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def fetch_through_redirects(url):
105105
resp.close()
106106
# Check for sneaky <meta> redirects.
107107
for meta in META_XPATH(tree):
108-
m = re.match("0;\s*url=['\"](.+?)['\"]", meta.get("content"))
108+
m = re.match(r"0;\s*url=['\"](.+?)['\"]", meta.get("content"))
109109
if m is not None:
110110
url = m.groups()[0]
111111
cont = True
@@ -190,7 +190,7 @@ def check_https_page(info):
190190
good_sts = info.new_check()
191191
sts = resp.headers.get("Strict-Transport-Security")
192192
if sts is not None:
193-
m = re.search("max-age=(\d+)", sts)
193+
m = re.search(r"max-age=(\d+)", sts)
194194
if m is not None:
195195
info.sts = int(m.group(1))
196196
if info.sts >= 2592000:

0 commit comments

Comments
 (0)