diff options
author | Jesús <heckyel@hyperbola.info> | 2020-12-31 12:59:20 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-31 12:59:20 -0500 |
commit | 48e7cdd9a4c32621d6b51e9d3232befe0ecd5e6e (patch) | |
tree | 6987a34ea75f1f8cadb567017876170f3f773612 | |
parent | ce56cbad2aa4166bf0bcbdfec49b13c052c87c6b (diff) | |
download | yt-local-48e7cdd9a4c32621d6b51e9d3232befe0ecd5e6e.tar.lz yt-local-48e7cdd9a4c32621d6b51e9d3232befe0ecd5e6e.tar.xz yt-local-48e7cdd9a4c32621d6b51e9d3232befe0ecd5e6e.zip |
Improve regex to pep8
-rw-r--r-- | server.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |