This commit is contained in:
@@ -15,7 +15,11 @@ import yaml
|
||||
from urllib import request as urlrequest
|
||||
|
||||
proxy_host = "gluetun-svc.gluetun.svc:8888"
|
||||
|
||||
proxy_url = 'http://gluetun-svc.gluetun.svc:8888'
|
||||
proxy = urlrequest.ProxyHandler({
|
||||
'http': proxy_url,
|
||||
'https': proxy_url # Add the handler for HTTPS
|
||||
})
|
||||
|
||||
def hello(request):
|
||||
return HttpResponse('<h1>Hello stash!</h1>')
|
||||
@@ -73,7 +77,7 @@ def increment_and_download(minimum_increment,maximum_increment,url,url_suffix,st
|
||||
elif len(str(increment)) == 1:
|
||||
increment_generated ='000' + str(increment)
|
||||
|
||||
proxy = urlrequest.ProxyHandler({'http': 'http://gluetun-svc.gluetun.svc:8888'})
|
||||
proxy = urlrequest.ProxyHandler({'https': 'http://gluetun-svc.gluetun.svc:8888'})
|
||||
opener = urlrequest.build_opener(proxy)
|
||||
urlrequest.install_opener(opener)
|
||||
urlrequest.urlretrieve(url+increment_generated+url_suffix, stash_folder+"/"+increment_generated+url_suffix)
|
||||
|
||||
Reference in New Issue
Block a user