aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/comments.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-07-08 02:56:54 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-07-08 16:22:23 -0700
commit26620cbac85f1fa5057e54fa8d91c35d907c0e0f (patch)
tree40763f1590f80c1d4e5d7d0ac1c1ce9d720ad3fb /youtube/comments.py
parent6ad09eb53a8b79b2241f56009d9757f8cac7181f (diff)
downloadyt-local-26620cbac85f1fa5057e54fa8d91c35d907c0e0f.tar.lz
yt-local-26620cbac85f1fa5057e54fa8d91c35d907c0e0f.tar.xz
yt-local-26620cbac85f1fa5057e54fa8d91c35d907c0e0f.zip
front-end support for adding to playlists
Diffstat (limited to 'youtube/comments.py')
-rw-r--r--youtube/comments.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube/comments.py b/youtube/comments.py
index 523a410..4a00292 100644
--- a/youtube/comments.py
+++ b/youtube/comments.py
@@ -1,5 +1,5 @@
import json
-import youtube.proto as proto
+from youtube import proto, common
import base64
from youtube.common import uppercase_escape, default_multi_get, format_text_runs, URL_ORIGIN, fetch_url
from string import Template
@@ -98,8 +98,8 @@ def request_comments(ctoken, replies=False):
print("got <!DOCTYPE>, retrying")
continue
break
- '''with open('debug/comments_debug', 'wb') as f:
- f.write(content)'''
+ with open('debug/comments_debug', 'wb') as f:
+ f.write(content)
return content
def parse_comments(content, replies=False):
@@ -181,6 +181,7 @@ def get_comments_page(query_string):
more_comments_button = more_comments_template.substitute(url = URL_ORIGIN + '/comments?ctoken=' + ctoken)
return yt_comments_template.substitute(
+ header = common.get_header(),
comments = comments_html,
page_title = 'Comments',
more_comments_button=more_comments_button,