aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/post_comment.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-05 00:20:39 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-05 00:20:39 -0800
commita57fc774260f2940449880ec9b6aaf40fa2776c3 (patch)
tree5a3c1620f637d0ed9c965dc3aadb16f397471e15 /youtube/post_comment.py
parentec2fb71a3701379246e3b9210cce25aa3f548fcc (diff)
downloadyt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.tar.lz
yt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.tar.xz
yt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.zip
WSGI for simple non-path GET pages
Diffstat (limited to 'youtube/post_comment.py')
-rw-r--r--youtube/post_comment.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/youtube/post_comment.py b/youtube/post_comment.py
index 587a258..fc4d4b1 100644
--- a/youtube/post_comment.py
+++ b/youtube/post_comment.py
@@ -152,8 +152,9 @@ def post_comment(parameters, fields):
return response'''
return code
-def get_delete_comment_page(query_string):
- parameters = urllib.parse.parse_qs(query_string)
+def get_delete_comment_page(env, start_response):
+ start_response('200 OK', [('Content-type','text/html'),])
+ parameters = env['fields']
style = '''
main{
@@ -180,10 +181,11 @@ def get_delete_comment_page(query_string):
style = style,
header = common.get_header(),
page = page,
- )
+ ).encode('utf-8')
-def get_post_comment_page(query_string):
- parameters = urllib.parse.parse_qs(query_string)
+def get_post_comment_page(env, start_response):
+ start_response('200 OK', [('Content-type','text/html'),])
+ parameters = env['fields']
video_id = parameters['video_id'][0]
parent_id = common.default_multi_get(parameters, 'parent_id', 0, default='')
@@ -224,4 +226,4 @@ textarea{
style = style,
header = common.get_header(),
page = page,
- ) \ No newline at end of file
+ ).encode('utf-8') \ No newline at end of file