aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/youtube.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-12-30 03:39:10 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-12-30 03:39:10 -0800
commitd86b4704f8dcefc44a6e0c960c44a4c6a75677bb (patch)
tree298986419690fa0c76c28f0ded7b46bc49d8ca1f /youtube/youtube.py
parenta9c1e804ed936f34e551333f62e165cf2e20b50c (diff)
downloadyt-local-d86b4704f8dcefc44a6e0c960c44a4c6a75677bb.tar.lz
yt-local-d86b4704f8dcefc44a6e0c960c44a4c6a75677bb.tar.xz
yt-local-d86b4704f8dcefc44a6e0c960c44a4c6a75677bb.zip
Option to use tor when logging in
Diffstat (limited to 'youtube/youtube.py')
-rw-r--r--youtube/youtube.py7
1 files changed, 6 insertions, 1 deletions
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: