From 9854c629d057f0d4bf1a405c36376ea542e36958 Mon Sep 17 00:00:00 2001 From: Howard20181 <40033067+Howard20181@users.noreply.github.com> Date: Fri, 20 Jan 2023 06:55:06 +0800 Subject: [PATCH] Restrict `content type` to `application/x-zip-compressed` --- scripts/generateGappsLink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generateGappsLink.py b/scripts/generateGappsLink.py index b74685e..47217c0 100644 --- a/scripts/generateGappsLink.py +++ b/scripts/generateGappsLink.py @@ -68,7 +68,7 @@ elif brand == "MindTheGapps": if res.status_code == 200: assets = json_data["assets"] for asset in assets: - if re.match(f'.*{release}.*{abi_map[arch]}.*\.zip$', asset["name"]): + if re.match(f'.*{release}.*{abi_map[arch]}.*\.zip$', asset["name"]) and asset["content_type"] == "application/x-zip-compressed": link = asset["browser_download_url"] break elif res.status_code == 403 and x_ratelimit_remaining == '0':