Downloader Func

This commit is contained in:
2025-09-18 00:35:27 +03:00
parent 76657553e5
commit 8e0116cb56
2 changed files with 11 additions and 0 deletions

View File

@@ -180,9 +180,19 @@ def CheckForUpdate(log=False):
print(f"Recieved Version {version} - Current Version {currentVersion}")
if version > currentVersion:
print(f"Downloading & Installing Update {version}")
download_file("https://kevinblog.sytes.net/APIS/TiropitLauncher/TiropitAPI.php", "test.mogus")
def download_file(url, filename):
with requests.get(url, stream=True) as r:
r.raise_for_status()
with open(filename, 'wb') as f:
for chunk in r.iter_content(chunk_size=8192):
f.write(chunk)
print(f"[Downloader] File downloaded at {filename}")
# [Update Functions] <-------------------------------------------------------------------------------------------------------------- [End]

1
CLI/test.mogus Normal file
View File

@@ -0,0 +1 @@
{"status":"error","message":"No SteamID provided","version":"1.0.5"}