diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-01-05 00:20:39 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-01-05 00:20:39 -0800 |
commit | a57fc774260f2940449880ec9b6aaf40fa2776c3 (patch) | |
tree | 5a3c1620f637d0ed9c965dc3aadb16f397471e15 /youtube/comments.py | |
parent | ec2fb71a3701379246e3b9210cce25aa3f548fcc (diff) | |
download | yt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.tar.lz yt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.tar.xz yt-local-a57fc774260f2940449880ec9b6aaf40fa2776c3.zip |
WSGI for simple non-path GET pages
Diffstat (limited to 'youtube/comments.py')
-rw-r--r-- | youtube/comments.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube/comments.py b/youtube/comments.py index efa1b26..4860636 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -356,8 +356,9 @@ $options $video_id_input <button type="submit" class="post-comment-button">$post_text</button> </form>''') -def get_comments_page(query_string): - parameters = urllib.parse.parse_qs(query_string) +def get_comments_page(env, start_response): + start_response('200 OK', [('Content-type','text/html'),] ) + parameters = env['fields'] ctoken = default_multi_get(parameters, 'ctoken', 0, default='') replies = False if not ctoken: @@ -419,4 +420,4 @@ def get_comments_page(query_string): header = common.get_header(), comments_area = comments_area, page_title = page_title, - )
\ No newline at end of file + ).encode('utf-8')
\ No newline at end of file |