From b86ede44bf2213be3c4e8c236d16b890b4f9d8e3 Mon Sep 17 00:00:00 2001 From: ned Date: Mon, 3 Jul 2023 22:44:12 +0200 Subject: [PATCH] log failure from yt audio extractor --- bot/plugins/youtube_audio_extractor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/plugins/youtube_audio_extractor.py b/bot/plugins/youtube_audio_extractor.py index 5d61fd5..da552ce 100644 --- a/bot/plugins/youtube_audio_extractor.py +++ b/bot/plugins/youtube_audio_extractor.py @@ -1,3 +1,4 @@ +import logging from typing import Dict from pytube import YouTube @@ -40,5 +41,6 @@ class YouTubeAudioExtractorPlugin(Plugin): 'value': output } } - except: + except Exception as e: + logging.warning(f'Failed to extract audio from YouTube video: {str(e)}') return {'result': 'Failed to extract audio'}