From 5b19ccfe0b236a471deaacf75b241634e731408f Mon Sep 17 00:00:00 2001 From: Sean Date: Sun, 26 Apr 2026 10:40:00 -0400 Subject: [PATCH] handle exceptions parsing dates --- newsfeed.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/newsfeed.py b/newsfeed.py index 1fec63c..5707388 100644 --- a/newsfeed.py +++ b/newsfeed.py @@ -74,7 +74,12 @@ class Video: description=splits[0].strip() url=splits[1].strip() icon=splits[2].strip() - timestamp=DateTime(splits[3].strip()) + datePart = splits[3].strip() + timestamp = DateTime.getCurrentTime() + try: + timestamp=DateTime(datePart) + except Exception as exception: + pass return(Video(description,url,icon,timestamp)) class NewsFeed: