diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-11-10 21:13:49 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-11-10 21:13:49 -0800 |
commit | 409fea01971c13eae62109f1b8afc01b94960beb (patch) | |
tree | e6ed412333b805ad72603d5b7f2f6824134ab0ce /youtube/comments.py | |
parent | 717bf210937c757595624348db9389969be9654f (diff) | |
download | yt-local-409fea01971c13eae62109f1b8afc01b94960beb.tar.lz yt-local-409fea01971c13eae62109f1b8afc01b94960beb.tar.xz yt-local-409fea01971c13eae62109f1b8afc01b94960beb.zip |
Use post/redirect/get method to prevent form resubmission for comments
Diffstat (limited to 'youtube/comments.py')
-rw-r--r-- | youtube/comments.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/comments.py b/youtube/comments.py index fef04a9..fe89ac9 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -348,7 +348,7 @@ def get_comments_page(query_string): thumbnail = '/i.ytimg.com/vi/'+ metadata['video_id'] + '/mqdefault.jpg', ) comment_box = comment_box_template.substitute( - form_action= common.URL_ORIGIN + '/comments?ctoken=' + make_comment_ctoken(metadata['video_id'], sort=1).replace("=", "%3D"), + form_action= common.URL_ORIGIN + '/post_comment', video_id_input='''<input type="hidden" name="video_id" value="''' + metadata['video_id'] + '''">''', post_text='Post comment' ) |