Fix ssl error

This commit is contained in:
ThomasV 2015-06-10 21:20:31 +02:00
parent 2b9b42d5f7
commit 557286ff79
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ if os.path.exists('../contrib/crowdin_api_key.txt'):
crowdin_api_key = open('../contrib/crowdin_api_key.txt').read().strip()
# Push to Crowdin
print 'Push to Crowdin'
url = ('http://api.crowdin.net/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key)
url = ('http://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key)
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(c.POST, 1)
@ -32,12 +32,12 @@ if os.path.exists('../contrib/crowdin_api_key.txt'):
c.perform()
# Build translations
print 'Build translations'
response = requests.request('GET', 'http://api.crowdin.net/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key).content
response = requests.request('GET', 'http://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key).content
print response
# Download & unzip
print 'Download translations'
zfobj = zipfile.ZipFile(StringIO(requests.request('GET', 'http://crowdin.net/download/project/' + crowdin_identifier + '.zip').content))
zfobj = zipfile.ZipFile(StringIO(requests.request('GET', 'http://crowdin.com/download/project/' + crowdin_identifier + '.zip').content))
print 'Unzip translations'
for name in zfobj.namelist():