1 Commits

Author SHA1 Message Date
cb5a1bfbbe Mege NF_0004 2026-04-27 12:47:13 -04:00
2 changed files with 4 additions and 3 deletions

View File

@@ -513,10 +513,10 @@ def parseDuration(strDuration):
# newsFeed=NewsFeed('/home/pi/Projects/Python/NewsFeed/') # newsFeed=NewsFeed('/home/pi/Projects/Python/NewsFeed/')
# newsFeed=NewsFeed('/home/pi/.kodi/addons/plugin.video.fox.news/resources/lib/videodb.txt') # newsFeed=NewsFeed('/home/pi/.kodi/addons/plugin.video.fox.news/resources/lib/videodb.txt')
# newsFeed=NewsFeed(PATH_VIDEO_DATABASE, myLog()) # newsFeed=NewsFeed(PATH_VIDEO_DATABASE, myLog())
# newsFeed=NewsFeed('/home/pi/Projects/Python/NewsFeed/', myLog()) # newsFeed=NewsFeed('C:/Python/NewsFeed/Archive', myLog())
# videos=newsFeed.getItemsInFeed(FOX_NEWS_URL) # videos=newsFeed.getItemsInFeed(FOX_NEWS_URL)
# for video in videos: # for video in videos:
# if(video.description.startswith("Martha")):
# print(f"Description={video.description}") # print(f"Description={video.description}")
# print(f"Url={video.url}") # print(f"Url={video.url}")
# print(f"getTimestamp={video.getTimestamp().toStringMonthDay()}") # print(f"getTimestamp={video.getTimestamp().toStringMonthDay()}")
@@ -524,6 +524,7 @@ def parseDuration(strDuration):
# print(f"getFeedTime={video.getFeedTime()}") # print(f"getFeedTime={video.getFeedTime()}")
# print(f"daysOld={(datetime.now()-video.getFeedTime()).days}") # print(f"daysOld={(datetime.now()-video.getFeedTime()).days}")
# print(' ') # print(' ')
# print(f"Got {len(videos)} videos")
# pull the time out of the description and subtract it from the time we scanned the feed. # pull the time out of the description and subtract it from the time we scanned the feed.
# the result will be the time of the article..use this to sort on. # the result will be the time of the article..use this to sort on.

View File

@@ -69,7 +69,7 @@ class Video:
url=splits[1].strip() url=splits[1].strip()
icon=splits[2].strip() icon=splits[2].strip()
datePart = splits[3].strip() datePart = splits[3].strip()
timestamp = DateTime.getCurrentTime() timestamp = DateTime()
try : try :
timestamp=DateTime(datePart) timestamp=DateTime(datePart)
except Exception as exception: except Exception as exception: