Parallel downloads using pySmartDL - python multip

2019-08-09 04:46发布

问题:

I'm hoping to use pySmartDL for my project to handle downloads. But pySmartDL doesn't support parallel downloads and the execution thread stops until a download is finished. I tried using WorQ to handle the issue. But with that download doesn't happen after I start it.Is there a better way to address this issue? Or is there any other Python libraries that support parallel downloads?

回答1:

pySmartDL already supports nonblocking multithreaded downloads:

from pySmartDL import SmartDL

files = [URL1,
         URL2,
         URL3]

objs = SmartDL(files, progress_bar=False)
objs.start(blocking=False)
while not objs.isFinished():
    # Do something else