handle exceptions parsing dates

This commit is contained in:
2026-04-26 10:40:00 -04:00
parent 410558fc5b
commit 5b19ccfe0b

View File

@@ -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: