Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb5a1bfbbe |
@@ -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.
|
||||||
|
|||||||
2
video.py
2
video.py
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user