diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-12-22 19:00:44 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-12-22 19:00:44 -0800 |
commit | c56fc56fa66242ae75a5b8f3e9c697f0f23c253a (patch) | |
tree | 549c10889c722976e0fde9218631da1f22233ffa /youtube/subscriptions.py | |
parent | 250723b797fbff83367d26231975bf0853d04872 (diff) | |
download | yt-local-c56fc56fa66242ae75a5b8f3e9c697f0f23c253a.tar.lz yt-local-c56fc56fa66242ae75a5b8f3e9c697f0f23c253a.tar.xz yt-local-c56fc56fa66242ae75a5b8f3e9c697f0f23c253a.zip |
Subscriptions: Cleaner error message when checking terminated channels
Don't display a nasty traceback in that case.
Diffstat (limited to 'youtube/subscriptions.py')
-rw-r--r-- | youtube/subscriptions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index 2c8f5f5..76130f3 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -453,9 +453,11 @@ def _get_upstream_videos(channel_id): time_published = int(calendar.timegm(time.strptime(time_published_element.text, '%Y-%m-%dT%H:%M:%S+00:00'))) times_published[video_id_element.text] = time_published - except (AssertionError, defusedxml.ElementTree.ParseError) as e: + except AssertionError: print('Failed to read atoma feed for ' + channel_status_name) traceback.print_exc() + except defusedxml.ElementTree.ParseError: + print('Failed to read atoma feed for ' + channel_status_name) channel_info = yt_data_extract.extract_channel_info(json.loads(channel_tab), 'videos') if channel_info['error']: |