diff options
author | Jesús <heckyel@hyperbola.info> | 2020-12-30 16:17:48 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-30 16:52:26 -0500 |
commit | 1f4d7cc9586bc0fbb19936efe5dad32109dfb952 (patch) | |
tree | ec25c1c4f7fc36b2d83b332a7bdad011b84126d3 /youtube/watch.py | |
parent | 056c3be3f2ab9a19d8b2c38396826aaad9d4081d (diff) | |
download | yt-local-1f4d7cc9586bc0fbb19936efe5dad32109dfb952.tar.lz yt-local-1f4d7cc9586bc0fbb19936efe5dad32109dfb952.tar.xz yt-local-1f4d7cc9586bc0fbb19936efe5dad32109dfb952.zip |
General theme: fix syntax W3C markup and add improve 'Published' date
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/watch.py')
-rw-r--r-- | youtube/watch.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index a7d712a..9e0ddf7 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -1,6 +1,7 @@ import youtube from youtube import yt_app from youtube import util, comments, local_playlist, yt_data_extract +from youtube.util import time_utc_isoformat import settings from flask import request @@ -491,6 +492,7 @@ def get_watch_page(video_id=None): header_playlist_names = local_playlist.get_playlist_names(), uploader_channel_url = ('/' + info['author_url']) if info['author_url'] else '', time_published = info['time_published'], + time_published_utc=time_utc_isoformat(info['time_published']), view_count = (lambda x: '{:,}'.format(x) if x is not None else "")(info.get("view_count", None)), like_count = (lambda x: '{:,}'.format(x) if x is not None else "")(info.get("like_count", None)), dislike_count = (lambda x: '{:,}'.format(x) if x is not None else "")(info.get("dislike_count", None)), |