diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 29b3432..5054b32 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -222,7 +222,7 @@ class Plugin(object): 'timeout': timeout, 'files': files, 'verify': False, #verify_ssl, Disable for now as to many wrongly implemented certificates.. - 'stream': stream + 'stream': stream, } method = 'post' if len(data) > 0 or files else 'get' diff --git a/couchpotato/runner.py b/couchpotato/runner.py index bc46518..8718355 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -151,12 +151,15 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En if not os.path.exists(python_cache): os.mkdir(python_cache) + session = requests.Session() + session.max_redirects = 1 + # Register environment settings Env.set('app_dir', sp(base_path)) Env.set('data_dir', sp(data_dir)) Env.set('log_path', sp(os.path.join(log_dir, 'CouchPotato.log'))) Env.set('db', db) - Env.set('http_opener', requests.Session()) + Env.set('http_opener', session) Env.set('cache_dir', cache_dir) Env.set('cache', FileSystemCache(python_cache)) Env.set('console_log', options.console_log)