|
|
@@ -16,7 +16,7 @@ def reporthook(count, block_size, total_size):
|
|
|
|
|
|
def http_down(project, down_list=[], proxy=""):
|
|
|
git_api = "https://api.github.com/repos/{}/releases/latest".format(project)
|
|
|
- git_releases="https://github.com/{}/releases/download/".format(project)
|
|
|
+ git_releases="{}/releases/download/".format(project)
|
|
|
|
|
|
print("获取", git_api)
|
|
|
r = requests.get(git_api, verify=False) #不检查证书
|
|
|
@@ -37,12 +37,12 @@ if __name__ == "__main__":
|
|
|
parser = argparse.ArgumentParser()
|
|
|
parser.add_argument("n", help="项目,譬如 yisier/nps")
|
|
|
parser.add_argument("l", help="下载列表,譬如 windows_amd64_client.tar.gz,windows_amd64_server.tar.gz")
|
|
|
- parser.add_argument("-p", default=False, help="代理,譬如 https://ghproxy.com/")
|
|
|
+ parser.add_argument("-p", default=False, help="代理,譬如 https://ghproxy.com/https://github.com/")
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
project = str(args.n)
|
|
|
down_list = list_str = str(args.l).split(",")
|
|
|
- proxy = "https://ghproxy.com/"
|
|
|
+ proxy = "https://github.com/"
|
|
|
if args.p:
|
|
|
proxy = str(args.p)
|
|
|
|