Commit 03e39ef8 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

détails

parent 0cd1ff35
......@@ -2,7 +2,7 @@
import os
from pathlib import Path
from zipfile import ZipFile
from zipfile import BadZipFile, ZipFile
from io import BytesIO
import requests
......@@ -14,12 +14,12 @@ VERSION = '16.04'
if __name__ == '__main__':
for project, namespace, branch in requests.get(f'{RAINBOARD}/doc').json()['ret']:
r = requests.get(f'{GITLAB}/{namespace}/{project}/-/jobs/artifacts/{branch}/download',
{'job': f'robotpkg-{project}-{VERSION}'}, stream=True)
url = f'{GITLAB}/{namespace}/{project}/-/jobs/artifacts/{branch}/download'
r = requests.get(url, {'job': f'robotpkg-{project}-{VERSION}'}, stream=True)
try:
z = ZipFile(BytesIO(r.content))
path = DOC / namespace / project / branch
path.mkdir(parents=True, exist_ok=True)
z.extractall(str(path))
except:
except BadZipFile:
continue
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment