From 24dfa6da11c2bfb00e496bef53311fa2456c90a8 Mon Sep 17 00:00:00 2001 From: "sganyunchi@163.com" <78394473+gi-b716@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:34:49 +0800 Subject: [PATCH] Change mirror --- _update.py | 19 ++++++++++++++++--- dataGenerator.py | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/_update.py b/_update.py index 2bc672b..e6a766f 100644 --- a/_update.py +++ b/_update.py @@ -1,10 +1,23 @@ -import requests import zipfile import sys import os -mirror = "https://autohack.netlify.app/" -# mirror = "https://gi-b716.github.io/autoHack/" +try: + import requests +except ImportError: + os.system("pip install requests") + import requests + +mirrorList = [["https://autohack.netlify.app/", "autohack.netlify.app"], ["https://gi-b716.github.io/autoHack/", "gi-b716.github.io"]] + +for i in range(len(mirrorList)): + print("{0}. {1}".format(i, mirrorList[i][0])) + os.system("ping {0} -n 2 -w 500".format(mirrorList[i][1])) + print() + +mirror = mirrorList[int(input("Set mirror: "))][0] + +os.system("cls") lasted = str(requests.get("{0}/LASTED".format(mirror)).content, "utf-8") diff --git a/dataGenerator.py b/dataGenerator.py index 5959a70..ecfd088 100644 --- a/dataGenerator.py +++ b/dataGenerator.py @@ -284,7 +284,7 @@ def mainPage(self): self.mainPage() class Meta: - _version = "5.1.0" + _version = "5.1.2" if __name__ == "__main__":