aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/youtube.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-12-16 18:49:09 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-12-16 18:49:09 -0800
commit7c97a1705301219783d901332951a2f1e86ed26f (patch)
tree8948f6f698e7ddf9a2f144f87c3eb91bce4433fe /youtube/youtube.py
parent804b7e8d84dc6ecdcd516582802215415f40a55d (diff)
downloadyt-local-7c97a1705301219783d901332951a2f1e86ed26f.tar.lz
yt-local-7c97a1705301219783d901332951a2f1e86ed26f.tar.xz
yt-local-7c97a1705301219783d901332951a2f1e86ed26f.zip
Support for custom channel urls
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r--youtube/youtube.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube/youtube.py b/youtube/youtube.py
index 74d03e9..cb35eac 100644
--- a/youtube/youtube.py
+++ b/youtube/youtube.py
@@ -41,9 +41,9 @@ def youtube(env, start_response):
start_response('200 OK', (('Content-type','text/html'),) )
return channel.get_channel_page(path[9:], query_string=query_string).encode()
- elif path.startswith("/user/"):
+ elif path.startswith("/user/") or path.startswith("/c/"):
start_response('200 OK', (('Content-type','text/html'),) )
- return channel.get_user_page(path[6:], query_string=query_string).encode()
+ return channel.get_channel_page_general_url(path, query_string=query_string).encode()
elif path.startswith("/playlists"):
start_response('200 OK', (('Content-type','text/html'),) )
@@ -71,8 +71,8 @@ def youtube(env, start_response):
return f.read().replace(b'$port_number', str(settings.port_number).encode())
else:
- start_response('404 Not Found', () )
- return b'404 Not Found'
+ start_response('200 OK', (('Content-type','text/html'),) )
+ return channel.get_channel_page_general_url(path, query_string=query_string).encode()
elif method == "POST":
fields = urllib.parse.parse_qs(env['wsgi.input'].read().decode())