From ea0705a98d69343e0b3a81168dee3d68a711550f Mon Sep 17 00:00:00 2001 From: James Taylor Date: Wed, 2 Jan 2019 21:42:14 -0800 Subject: Add permalink to comment on timestamp --- youtube/comments.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'youtube/comments.py') diff --git a/youtube/comments.py b/youtube/comments.py index 1d96545..efa1b26 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -26,7 +26,9 @@ $avatar
$author
- + $text $likes @@ -277,6 +279,8 @@ def get_comments_html(comments): action_buttons = '''Delete''' else: action_buttons = '' + + permalink = URL_ORIGIN + '/watch?v=' + comment['video_id'] + '&lc=' + comment['comment_id'] html_result += comment_template.substitute( author=comment['author'], author_url = URL_ORIGIN + comment['author_url'], @@ -287,6 +291,7 @@ def get_comments_html(comments): datetime = '', #TODO replies = replies, action_buttons = action_buttons, + permalink = permalink, ) return html_result -- cgit v1.2.3