diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index c95866f..2219d55 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -148,7 +148,12 @@ class RVElement: @property def date(self) -> datetime.datetime: - return datetime.datetime.fromtimestamp(self.item["published"]) + timestamp = ( + int(self.item.get("timestampUsec", "0")) / 1000000 + or int(self.item.get("crawlTimeMsec", "0")) / 1000 + or self.item["published"] + ) + return datetime.datetime.fromtimestamp(timestamp) @property def is_researched(self) -> bool: @@ -475,7 +480,7 @@ class RVDatabase: def ytdl_opts(self) -> dict: # Get user/system options prev_argv = sys.argv - sys.argv = ['yt-dlp'] + sys.argv = ["yt-dlp"] _, _, _, ydl_opts = yt_dlp.parse_options() sys.argv = prev_argv return ydl_opts