From 98c4a380df39b5b572982b07a27df88b579670b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:26:05 +0800 Subject: [PATCH] Update build.py --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index fa574da5..21310c56 100644 --- a/build.py +++ b/build.py @@ -1,8 +1,8 @@ import argparse import os -import shutil +import shutil,json import subprocess -import requests + py37Path32 = os.path.join( os.environ["LOCALAPPDATA"], "Programs\\Python\\Python37-32\\python.exe" ) @@ -173,7 +173,7 @@ def downloadOCRModel(locale): def buildLunaHook(): - for ass in requests.get('https://api.github.com/repos/HIllya51/LunaHook/releases/latest').json()['assets']: + for ass in json.loads(subprocess.run('curl -s https://api.github.com/repos/HIllya51/LunaHook/releases/latest',stdout=subprocess.PIPE).stdout.decode('utf8'))['assets']: if ass['name']=='Release_English.zip': os.chdir(rootDir + "\\temp") subprocess.run(f"curl -LO {ass['browser_download_url']}")