diff --git a/django_code/stash_management/apps.py b/django_code/stash_management/apps.py index 3eb4946..5404c9c 100644 --- a/django_code/stash_management/apps.py +++ b/django_code/stash_management/apps.py @@ -73,10 +73,10 @@ def increment_and_download(minimum_increment,maximum_increment,url,url_suffix,st elif len(str(increment)) == 1: increment_generated ='000' + str(increment) - proxy = urllib.request.ProxyHandler({'socks': 'socks://gluetun-svc.gluetun.svc:8888'}) - opener = urllib.request.build_opener(proxy) - urllib.request.install_opener(opener) - urllib.request.urlretrieve(url+increment_generated+url_suffix, stash_folder+"/"+increment_generated+url_suffix) + proxy = urlrequest.ProxyHandler({'socks': 'socks://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) text_generated = "\n downloading for "+name+" "+url+increment_generated+url_suffix return text_generated