Make rssVideos use release date
This commit is contained in:
parent
95faa0c0ff
commit
ceaa2d1671
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue