From d86b4704f8dcefc44a6e0c960c44a4c6a75677bb Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 30 Dec 2018 03:39:10 -0800 Subject: Option to use tor when logging in --- youtube/youtube.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'youtube/youtube.py') diff --git a/youtube/youtube.py b/youtube/youtube.py index 418e707..8260faf 100644 --- a/youtube/youtube.py +++ b/youtube/youtube.py @@ -122,7 +122,12 @@ def youtube(env, start_response): else: save_account = False - if accounts.add_account(fields['username'][0], fields['password'][0], save_account ): + if 'use_tor' in fields and fields['use_tor'][0] == "on": + use_tor = True + else: + use_tor = False + + if accounts.add_account(fields['username'][0], fields['password'][0], save_account, use_tor ): start_response('200 OK', () ) return b'Account successfully added' else: -- cgit v1.2.3