I am trying to download a zip file from url @https://tools.company.com/api/v1/prkit/download/10102665/
using below logic ,I dont see any errors but the file doesnt download either?any guidance on what is wrong and how to fix it?
import urllib2, base64
username = 'xxxx'
password = 'xxxx'
request = urllib2.Request("https://tools.company.com/api/v1/prkit/download/10102665/")
base64string = base64.standard_b64encode('%s:%s' % (username, password)).replace('\n', '')
request.add_header("Authorization", "Basic %s" % base64string)
result = urllib2.urlopen(request)
print result
UPDATE:
Tried Basic http file downloading and saving to disk in python? but it doesnt seem to have a way to authenticate,added a comment.Any other ways this can be done?