aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2022-03-27 14:48:07 -0700
committerJesús <heckyel@hyperbola.info>2022-03-30 00:45:45 +0800
commit263469cd30ce91b3ba2eb49a0ed5be281571e7c7 (patch)
treec0a25fb8d6462f80bc79e9e1d0a8b9a2acd83cf2
parent79fd2966cdd53dd969b225de9e56f17cc3895206 (diff)
downloadyt-local-263469cd30ce91b3ba2eb49a0ed5be281571e7c7.tar.lz
yt-local-263469cd30ce91b3ba2eb49a0ed5be281571e7c7.tar.xz
yt-local-263469cd30ce91b3ba2eb49a0ed5be281571e7c7.zip
Filter out noisy video routing requests in console
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r--server.py10
1 files 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