aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-12-26 17:24:53 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-12-26 17:24:53 -0800
commit6a23df8c90cd3def49f83a68b501f785eefc6b37 (patch)
tree4e6eabc8fb964fc6fccf4947d8b5bbe9766debaa /youtube/watch.py
parentb321b5fc6484c38d861530e6b89405b062e32459 (diff)
downloadyt-local-6a23df8c90cd3def49f83a68b501f785eefc6b37.tar.lz
yt-local-6a23df8c90cd3def49f83a68b501f785eefc6b37.tar.xz
yt-local-6a23df8c90cd3def49f83a68b501f785eefc6b37.zip
Don't use tor when logging in
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py
index 2d10ec1..4051a3f 100644
--- a/youtube/watch.py
+++ b/youtube/watch.py
@@ -232,7 +232,11 @@ def get_watch_page(query_string):
parsed_qs = urllib.parse.parse_qs(query_string)
id = parsed_qs['v'][0]
lc = common.default_multi_get(parsed_qs, 'lc', 0, default='')
- downloader = YoutubeDL(params={'youtube_include_dash_manifest':False})
+ if settings.route_tor:
+ proxy = 'socks5://127.0.0.1:9150/'
+ else:
+ proxy = ''
+ downloader = YoutubeDL(params={'youtube_include_dash_manifest':False, 'proxy':proxy})
tasks = (
gevent.spawn(comments.video_comments, id, int(settings.default_comment_sorting), lc=lc ),
gevent.spawn(extract_info, downloader, "https://www.youtube.com/watch?v=" + id, download=False)