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)