mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-21 18:55:24 -04:00
25 lines
593 B
Python
25 lines
593 B
Python
#!/bin/env python
|
|
|
|
import os
|
|
import pycurl
|
|
|
|
# Don't edit below this line
|
|
|
|
def checkAndDeleteFile(file):
|
|
if os.path.exists(file):
|
|
print(f"Deleting {file}")
|
|
os.remove(file)
|
|
|
|
def cDownload(url, file):
|
|
with open(file, 'wb') as f:
|
|
c = pycurl.Curl()
|
|
c.setopt(c.URL, url)
|
|
c.setopt(c.WRITEDATA, f)
|
|
c.setopt(c.FOLLOWLOCATION, True)
|
|
c.setopt(c.USERAGENT, "NUSspliBuilder/2.2")
|
|
c.setopt(c.ACCEPT_ENCODING, "")
|
|
c.perform()
|
|
c.close()
|
|
|
|
checkAndDeleteFile("db.go")
|
|
cDownload("https://napi.v10lator.de/db?t=go", "db.go")
|