From e2d6cabed5c6d1e3be8c82cd05983f2ecf3f3419 Mon Sep 17 00:00:00 2001 From: MMaker Date: Thu, 27 Feb 2025 11:18:24 -0500 Subject: [PATCH] More logging --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index 4312897..4807747 100644 --- a/app.py +++ b/app.py @@ -283,11 +283,14 @@ def proxy(video_id): logger.info(f"Received request for video ID: {video_id}") if cache: + logging.info(f"Checking cache for video ID: {video_id}") cached_html = cache.get(video_id) if cached_html is not None: logger.info(f"Using cached response for video ID: {video_id}") return Response(cached_html, mimetype="text/html") # type: ignore + logging.info(f"Cache miss for video ID: {video_id} - fetching") + # Not in cache or cache expired; fetch from nicovideo.jp real_url = f"https://www.nicovideo.jp/watch/{video_id}" params, soup = get_data(video_id, real_url)