handle exceptions parsing dates
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user