10 lines
367 B
Python
10 lines
367 B
Python
import http.client
|
|
|
|
|
|
def download_apk(sha256: str, api_key: str) -> bytes:
|
|
conn = http.client.HTTPSConnection("androzoo.uni.lu")
|
|
conn.request("GET", f"/api/download?apikey={api_key}&sha256={sha256}")
|
|
resp = conn.getresponse()
|
|
if resp.status != 200:
|
|
raise RuntimeError(f"Failled to download APK {sha256}: {resp.reason}")
|
|
return resp.read()
|