From 54082e82aa35a8293dd2dc60fbaba9e1af94d0d8 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 5 Sep 2021 00:08:58 -0700 Subject: [PATCH] Log the exceptions that cause RSSAssistFailed. --- ycdl/ytrss.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ycdl/ytrss.py b/ycdl/ytrss.py index fd3ff19..0e01528 100644 --- a/ycdl/ytrss.py +++ b/ycdl/ytrss.py @@ -3,6 +3,7 @@ import bs4 # away instead of when bs4 tries to parse. import lxml import requests +import traceback from voussoirkit import vlogging @@ -31,14 +32,17 @@ def get_user_videos(channel_id): try: return _get_user_videos(channel_id) except Exception as exc: - raise exceptions.RSSAssistFailed(f'Failed to fetch RSS videos.') from exc + log.warning(traceback.format_exc()) + raise exceptions.RSSAssistFailed(f'Failed to fetch RSS videos ({exc}).') from exc def get_user_videos_since(channel_id, video_id): ''' Return the list of video ids that are more recently released than the reference id. ''' + # Let RSSAssistFailed raise. video_ids = get_user_videos(channel_id) + try: index = video_ids.index(video_id) except ValueError: