aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/youtube.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-06 01:33:52 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-06 01:33:52 -0800
commitbb2d40ac83f222678ed5b4265355b9f146f2ba3e (patch)
tree836262b08777a3ad9e23c700d1c4f81d45ffe73c /youtube/youtube.py
parenteea16e5ac32696ea711fbc3846c113ccdfd2928b (diff)
downloadyt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.tar.lz
yt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.tar.xz
yt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.zip
rename env['fields'] to env['parameters'] and rename fields to parameters in general
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r--youtube/youtube.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/youtube/youtube.py b/youtube/youtube.py
index 57ea481..46cfdf0 100644
--- a/youtube/youtube.py
+++ b/youtube/youtube.py
@@ -37,8 +37,8 @@ post_handlers = {
def youtube(env, start_response):
path, method, query_string = env['PATH_INFO'], env['REQUEST_METHOD'], env['QUERY_STRING']
- env['qs_fields'] = urllib.parse.parse_qs(query_string)
- env['fields'] = dict(env['qs_fields'])
+ env['qs_parameters'] = urllib.parse.parse_qs(query_string)
+ env['parameters'] = dict(env['qs_parameters'])
path_parts = path.rstrip('/').lstrip('/').split('/')
env['path_parts'] = path_parts
@@ -86,10 +86,9 @@ def youtube(env, start_response):
return channel.get_channel_page_general_url(env, start_response)
elif method == "POST":
- post_fields = urllib.parse.parse_qs(env['wsgi.input'].read().decode())
- env['post_fields'] = post_fields
- env['fields'].update(post_fields)
- fields = post_fields
+ post_parameters = urllib.parse.parse_qs(env['wsgi.input'].read().decode())
+ env['post_parameters'] = post_parameters
+ env['parameters'].update(post_parameters)
try:
handler = post_handlers[path_parts[0]]