aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-08-29 00:33:28 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-08-29 00:33:28 -0700
commitfee24d4f0a3ddcf877facfa9b22d470bee37ee79 (patch)
tree6c2084feca5596ec2bc239bbdca2d35c6066364b /youtube/watch.py
parent6a6433619f82652d7943e29579fe6cf1bbf0cc11 (diff)
downloadyt-local-fee24d4f0a3ddcf877facfa9b22d470bee37ee79.tar.lz
yt-local-fee24d4f0a3ddcf877facfa9b22d470bee37ee79.tar.xz
yt-local-fee24d4f0a3ddcf877facfa9b22d470bee37ee79.zip
Ability to post comments (not reply yet)
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index d98cd3f..ad3c448 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -385,7 +385,6 @@ def get_watch_page(query_string):
music_list_html += '''</tr>\n'''
music_list_html += '''</table>\n'''
-
download_options = ''
for format in info['formats']:
@@ -396,6 +395,10 @@ def get_watch_page(query_string):
note = html.escape(downloader._format_note(format)),
)
+ post_comment_url = common.URL_ORIGIN + "/post_comment?v=" + id
+ post_comment_link = '''<a class="post-comment-link" href="''' + post_comment_url + '''">Post comment</a>'''
+
+
page = yt_watch_template.substitute(
video_title = html.escape(info["title"]),
page_title = html.escape(info["title"]),
@@ -411,6 +414,8 @@ def get_watch_page(query_string):
description = html.escape(info["description"]),
video_sources = formats_html(sorted_formats) + subtitles_html(info),
related = related_videos_html,
+ post_comment_link = post_comment_link,
+ comment_count = '',
comments = comments_html,
more_comments_button = more_comments_button,
music_list = music_list_html,