aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/youtube.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r--youtube/youtube.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube/youtube.py b/youtube/youtube.py
index 446de0d..3c31fa4 100644
--- a/youtube/youtube.py
+++ b/youtube/youtube.py
@@ -1,6 +1,6 @@
import mimetypes
import urllib.parse
-from youtube import local_playlist, watch, search, playlist, channel, comments, common
+from youtube import local_playlist, watch, search, playlist, channel, comments, common, account_functions
YOUTUBE_FILES = (
"/shared.css",
"/opensearch.xml",
@@ -52,6 +52,9 @@ def youtube(env, start_response):
result = common.fetch_url('https://www.youtube.com' + path + ('?' + query_string if query_string else ''))
result = result.replace(b"align:start position:0%", b"")
return result
+ elif path == "/post_comment":
+ start_response('200 OK', () )
+ return account_functions.get_post_comment_page(query_string).encode()
else:
start_response('404 Not Found', () )
return b'404 Not Found'
@@ -77,6 +80,10 @@ def youtube(env, start_response):
else:
start_response('400 Bad Request', ())
return b'400 Bad Request'
+ elif path == "/post_comment":
+ start_response('200 OK', () )
+ return account_functions.post_comment(query_string, fields).encode()
+
else:
start_response('404 Not Found', ())
return b'404 Not Found'