From 48e7cdd9a4c32621d6b51e9d3232befe0ecd5e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 31 Dec 2020 12:59:20 -0500 Subject: Improve regex to pep8 --- server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server.py') diff --git a/server.py b/server.py index fc9d30e..649de38 100644 --- a/server.py +++ b/server.py @@ -245,7 +245,12 @@ def site_dispatch(env, start_response): class FilteredRequestLog: '''Don't log noisy thumbnail and avatar requests''' - filter_re = re.compile(r'"GET /https://(i\.ytimg\.com/|www\.youtube\.com/data/subscription_thumbnails/|yt3\.ggpht\.com/|www\.youtube\.com/api/timedtext).*" 200') + filter_re = re.compile(r"""(?x)^ + "GET /https://(i[.]ytimg[.]com/| + www[.]youtube[.]com/data/subscription_thumbnails/| + yt3[.]ggpht[.]com/| + www[.]youtube[.]com/api/timedtext).*" 200 + """) def __init__(self): pass -- cgit v1.2.3