From 263469cd30ce91b3ba2eb49a0ed5be281571e7c7 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 27 Mar 2022 14:48:07 -0700 Subject: Filter out noisy video routing requests in console MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- server.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index c038d6d..c8e0d0e 100644 --- a/server.py +++ b/server.py @@ -250,12 +250,14 @@ def site_dispatch(env, start_response): class FilteredRequestLog: '''Don't log noisy thumbnail and avatar requests''' - filter_re = re.compile(r"""(?x)^ - "GET /https://(i[.]ytimg[.]com/| + 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 - """) + www[.]youtube[.]com/api/timedtext| + [-\w]+[.]googlevideo[.]com/).*"\ (200|206) + ''') def __init__(self): pass -- cgit v1.2.3