pythondownloadpython-multithreadingunrar

PYTHON - UNRAR : how can I build a thread to monitoring the downloading status


Good Morning,

I need some help concerning my script. I'm a beginner in Python and I would like to know how can I add a thread to verifiy my downloading process ?

Here my Download Script:

class Download:

  def __init__(self):
    self.path="FolderFiles"
    self.target=" /var/www/folder/Output"

def downloadFile(self):
        for root, dirs, files in os.walk(self.path, topdown=False):
          for name in files:
            print(name)
            rarFiles=os.path.join(root, name)
            unrar = "unrar x -y "+rarFiles+self.target
          os.system(unrar)
          #time.sleep(10)

additional information: I used python 3.x with unrar library

Thanks for your help


Solution

  • After lot of test, I decided to work in this way: analyse the files after downloading in function of size, downloading time etc... The unrar library cannot provides any solutions to test the good process during the downloading

    Thank for your help