Fix ssl error
This commit is contained in:
@@ -23,7 +23,7 @@ if os.path.exists('../contrib/crowdin_api_key.txt'):
|
|||||||
crowdin_api_key = open('../contrib/crowdin_api_key.txt').read().strip()
|
crowdin_api_key = open('../contrib/crowdin_api_key.txt').read().strip()
|
||||||
# Push to Crowdin
|
# Push to Crowdin
|
||||||
print '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 = pycurl.Curl()
|
||||||
c.setopt(c.URL, url)
|
c.setopt(c.URL, url)
|
||||||
c.setopt(c.POST, 1)
|
c.setopt(c.POST, 1)
|
||||||
@@ -32,12 +32,12 @@ if os.path.exists('../contrib/crowdin_api_key.txt'):
|
|||||||
c.perform()
|
c.perform()
|
||||||
# Build translations
|
# Build translations
|
||||||
print '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
|
print response
|
||||||
|
|
||||||
# Download & unzip
|
# Download & unzip
|
||||||
print 'Download translations'
|
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'
|
print 'Unzip translations'
|
||||||
for name in zfobj.namelist():
|
for name in zfobj.namelist():
|
||||||
|
|||||||
Reference in New Issue
Block a user