aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-09-22 20:59:20 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-09-22 20:59:20 -0700
commit5f5034e826eb98e730ac0cb357f4236982988053 (patch)
treee2a61612fb17c1d0f933bac9da1018997a71bdb0 /server.py
parent09e988818240ad552397a868d9ed8e444877a5cb (diff)
downloadyt-local-5f5034e826eb98e730ac0cb357f4236982988053.tar.lz
yt-local-5f5034e826eb98e730ac0cb357f4236982988053.tar.xz
yt-local-5f5034e826eb98e730ac0cb357f4236982988053.zip
Increase max redirects for video routing
Diffstat (limited to 'server.py')
-rw-r--r--server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.py b/server.py
index 9d3258a..4fe42a6 100644
--- a/server.py
+++ b/server.py
@@ -46,7 +46,11 @@ def proxy_site(env, start_response, video=False):
if video and settings.route_tor == 1:
response, cleanup_func = util.fetch_url_response(url, headers,
- use_tor=False)
+ use_tor=False,
+ max_redirects=10)
+ elif video:
+ response, cleanup_func = util.fetch_url_response(url, headers,
+ max_redirects=10)
else:
response, cleanup_func = util.fetch_url_response(url, headers)