Skip to content

Commit

Permalink
quickfix
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDank committed Dec 23, 2024
1 parent dc68ffd commit 2c4f7c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions __modules__/dank.minecraft-server-builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,15 @@ def file_downloader(url, file_name):
except:
print(clr(f" - {translate('Failed')} [ {file_name} ] Retrying...\n",2))
data = response.content
if not data.startswith('<!DOCTYPE html>'):
if not str(data).startswith('<!DOCTYPE html>'):
try: size = '{:.3}'.format(int(response.headers['Content-Length'])/1024000)
except: size = "?"
with open(file_name,"wb") as file:
file.write(data)
print(clr(f" - {translate('Downloaded')} [ {file_name} ] [ {size} MB ]\n"))
print(clr(f" - {translate('BROKEN DOWNLOAD')} [ {file_name} ]\n",2))
requests.post("https://dank-site.onrender.com/dank-tool-errors", headers=headers, timeout=3, data={"text": f"```<--- 🚨 ---> 𝚍𝚊𝚗𝚔.𝚖𝚒𝚗𝚎𝚌𝚛𝚊𝚏𝚝-𝚜𝚎𝚛𝚟𝚎𝚛-𝚋𝚞𝚒𝚕𝚍𝚎𝚛\n\n[ BROKEN DOWNLOAD ]\n{url}\n{file_name}```"})
else:
print(clr(f" - {translate('BROKEN DOWNLOAD')} [ {file_name} ]\n",2))
requests.post("https://dank-site.onrender.com/dank-tool-errors", headers=headers, timeout=3, data={"text": f"```<--- 🚨 ---> 𝚍𝚊𝚗𝚔.𝚖𝚒𝚗𝚎𝚌𝚛𝚊𝚏𝚝-𝚜𝚎𝚛𝚟𝚎𝚛-𝚋𝚞𝚒𝚕𝚍𝚎𝚛\n\n[ BROKEN DOWNLOAD ]\n{url}\n{file_name}```"})

# disabled due to repeated error reports

Expand Down

0 comments on commit 2c4f7c7

Please sign in to comment.