mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-27 13:34:36 -04:00
27 lines
568 B
Python
27 lines
568 B
Python
#!/bin/env python
|
|
|
|
import os
|
|
import requests
|
|
|
|
# Don't edit below this line
|
|
|
|
|
|
def checkAndDeleteFile(file):
|
|
if os.path.exists(file):
|
|
print(f"Deleting {file}")
|
|
os.remove(file)
|
|
|
|
|
|
def downloadFile(url, file, headers={}):
|
|
print(f"Downloading {file}")
|
|
with requests.get(url, headers=headers) as r:
|
|
with open(file, "wb") as f:
|
|
f.write(r.content)
|
|
|
|
|
|
checkAndDeleteFile("db.go")
|
|
downloadFile(
|
|
"https://napi.v10lator.de/db?t=go",
|
|
"db.go",
|
|
{"User-Agent": "NUSspliBuilder/2.2", "Accept-Encoding": "br, gzip, deflate"},
|
|
)
|