Skip to content

Commit

Permalink
Update mediafire_dl.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vasusen-code committed Jan 18, 2022
1 parent 5ebea21 commit 555dbb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mediafire_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ def download(url, output, quiet, sender_id):
downloaded = []
for chunk in res.iter_content(chunk_size=CHUNK_SIZE):
f.write(chunk)
for cont in chunk:
for cont in chunk:
downloaded.append(cont)
percentage = (int((total)/(len(downloaded))))*100
percentage = (len(downloaded)/total)*100
gross = humanbytes(len(downloaded)) + "~" + humanbytes(total)
speed = int((len(downloaded))/(int(((0.0001 + time.time()) - start_dl))))
eta = int(((total) - (len(downloaded)))/speed)
speed = ((len(downloaded))/(((0.0001 + time.time()) - start_dl)))
eta = (((total) - (len(downloaded)))/speed)
msg = f"Downloading {percentage}%\ | {gross} | {humanbytes(speed)}, [{time_formatter(eta)}]"
print(msg)

Expand Down

0 comments on commit 555dbb5

Please sign in to comment.