From 7f0e24a29d5f2bfa83c5d4d1910b464d8d81a94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 12 Dec 2021 14:52:21 +0100 Subject: [PATCH] rssVideos: Slightly better error handling Makes it actually quit on Ctrl+C --- config/scripts/requirements.txt | 3 ++- config/scripts/rssVideos | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/scripts/requirements.txt b/config/scripts/requirements.txt index 33c1a34..d364bdb 100644 --- a/config/scripts/requirements.txt +++ b/config/scripts/requirements.txt @@ -1,3 +1,4 @@ coloredlogs>=10.0<11 progressbar2>=3.47.0<4 -youtube-dl>=2021.6.6 +yt-dlp>=2021.10.22 +ConfigArgParse>=1.5<2 diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index 74c5787..7e8687b 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -8,9 +8,6 @@ The common use case would be a feed from an RSS aggregator with the unread items (non-video links are ignored). """ -# TODO Distribute this correclty, in the meanwhile please do -# pip install --user coloredlogs ConfigArgParse yt-dlp - import enum import functools import logging @@ -118,7 +115,9 @@ class RVElement: log.info(f"Researching: {self}") try: infos = self.parent.ytdl_dry.extract_info(self.link) - except BaseException as e: + except KeyboardInterrupt as e: + raise e + except youtube_dl.utils.DownloadError as e: # TODO Still raise in case of temporary network issue log.warn(e) infos = None