aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/channel.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-06 19:31:01 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-06 19:31:01 -0800
commit1ba38a5c9cc7a7b21a5a8a54db630f47c9a550ea (patch)
tree7761c2581b9c5ddc2195b013c7ddd0dec9c01d32 /youtube/channel.py
parent1c061783b42aecf8d8843adf9bd89baaba58996c (diff)
downloadyt-local-1ba38a5c9cc7a7b21a5a8a54db630f47c9a550ea.tar.lz
yt-local-1ba38a5c9cc7a7b21a5a8a54db630f47c9a550ea.tar.xz
yt-local-1ba38a5c9cc7a7b21a5a8a54db630f47c9a550ea.zip
Content-type: text/plain for errors or status messages
Diffstat (limited to 'youtube/channel.py')
-rw-r--r--youtube/channel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube/channel.py b/youtube/channel.py
index 6acb371..1ec5635 100644
--- a/youtube/channel.py
+++ b/youtube/channel.py
@@ -402,7 +402,7 @@ def get_channel_page(env, start_response):
result = channel_search_page(polymer_json, query, page_number, number_of_videos, env['QUERY_STRING'])
else:
- start_response('404 Not Found', ())
+ start_response('404 Not Found', [('Content-type', 'text/plain'),])
return b'Unknown channel tab: ' + tab.encode('utf-8')
start_response('200 OK', [('Content-type','text/html'),])
@@ -423,7 +423,7 @@ def get_channel_page_general_url(env, start_response):
page = 'videos'
base_url = 'https://www.youtube.com/' + '/'.join(path_parts)
else:
- start_response('404 Not Found', ())
+ start_response('404 Not Found', [('Content-type', 'text/plain'),])
return b'Invalid channel url'
if page == 'videos':
@@ -446,7 +446,7 @@ def get_channel_page_general_url(env, start_response):
polymer_json = json.loads(polymer_json)
return channel_search_page('''
else:
- start_response('404 Not Found', ())
+ start_response('404 Not Found', [('Content-type', 'text/plain'),])
return b'Unknown channel page: ' + page.encode('utf-8')
start_response('200 OK', [('Content-type','text/html'),])