From a57fc774260f2940449880ec9b6aaf40fa2776c3 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 5 Jan 2019 00:20:39 -0800 Subject: WSGI for simple non-path GET pages --- youtube/accounts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'youtube/accounts.py') diff --git a/youtube/accounts.py b/youtube/accounts.py index e7336a4..ebb9eae 100644 --- a/youtube/accounts.py +++ b/youtube/accounts.py @@ -51,7 +51,9 @@ def cookiejar_from_lwp_str(lwp_str): def account_cookiejar(channel_id): return cookiejar_from_lwp_str('\n'.join(accounts[channel_id]['cookies'])) -def get_account_login_page(query_string): +def get_account_login_page(env, start_response): + start_response('200 OK', [('Content-type','text/html'),] ) + style = ''' main{ display: grid; @@ -114,7 +116,7 @@ Using Tor to log in should only be done if the account was created using a proxy style = style, header = common.get_header(), page = page, - ) + ).encode('utf-8') -- cgit v1.2.3