IceflowRE / unidown

Universal Downloader - update, manage, download.
GNU General Public License v3.0
0 stars 2 forks source link

Add custom file checking #27

Closed IceflowRE closed 6 years ago

IceflowRE commented 6 years ago

Need custom checking if a good file is downloaded. Or add after and before methodes?

with filename.open(mode='r', encoding="utf-8") as reader:
  check = reader.readline(14)
    if check == "<!DOCTYPE html":  # if only the html file "Invalid Attachment specified." was downloaded
      download_failed_list.append(at_id)
    else:
      download_succeed_list.append(at_id)