aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/account_functions.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-08-31 23:10:22 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-08-31 23:10:22 -0700
commit6146c5293bc44edd3a5797275874b58cd019a4fc (patch)
tree67164c92ef45836ef4b657fb8a4fdb723ae80f46 /youtube/account_functions.py
parenta9ea97ad395cd37a97762550d5f4f2573b4759c6 (diff)
downloadyt-local-6146c5293bc44edd3a5797275874b58cd019a4fc.tar.lz
yt-local-6146c5293bc44edd3a5797275874b58cd019a4fc.tar.xz
yt-local-6146c5293bc44edd3a5797275874b58cd019a4fc.zip
Return comments by newest after posting top-level comment
Diffstat (limited to 'youtube/account_functions.py')
-rw-r--r--youtube/account_functions.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/youtube/account_functions.py b/youtube/account_functions.py
index 9dd3d10..b3c9541 100644
--- a/youtube/account_functions.py
+++ b/youtube/account_functions.py
@@ -93,12 +93,7 @@ def post_comment(query_string, fields):
return comments.get_comments_page(query_string)
else:
_post_comment(fields['comment_text'][0], fields['video_id'][0], token, cookie_data)
- return common.yt_basic_template.substitute(
- page_title = "Success",
- style = '',
- header = common.get_header(),
- page = 'Comment sucessfully posted',
- )
+ return comments.get_comments_page('ctoken=' + comments.make_comment_ctoken(video_id, sort=1))
def get_post_comment_page(query_string):
@@ -120,7 +115,7 @@ textarea{
grid-column:2;
}'''
page = '''<div class="left">
- <form action="" method="post" class="comment-form">
+ <form action="''' + common.URL_ORIGIN + '/comments?ctoken=' + comments.make_comment_ctoken(video_id, sort=1).replace("=", "%3D") + '''" method="post" class="comment-form">
<textarea name="comment_text"></textarea>
<input type="hidden" name="video_id" value="''' + video_id + '''">
<button type="submit">Post comment</button>