From f90dd00a0dc690a36c23f622b24b21a7c01c0fc7 Mon Sep 17 00:00:00 2001 From: Hedayat Vatankhah Date: Tue, 29 May 2012 13:14:36 +0430 Subject: Apparently, aria2 cannot read more than about 4080 characters of URLs from input file --- yum-fast-downloader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yum-fast-downloader.py b/yum-fast-downloader.py index fb8c88b..f8b337c 100644 --- a/yum-fast-downloader.py +++ b/yum-fast-downloader.py @@ -82,7 +82,11 @@ def downloadFile(urls, remote_path, local_path, proxies = None): def queueDownload(inputFile, urls, remote_path, local_path, proxies = None): if urls[0].startswith("http://") or urls[0].startswith("ftp://"): + h = "" for url in urls: + h = h + url + remote_path + "\t" + if len(h) > 4080: + break; inputFile.write(url + remote_path + "\t") inputFile.write("\n") inputFile.write(" out={0}.yfd\n".format(os.path.basename(local_path))) -- cgit