summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHedayat Vatankhah <hedayat.fwd@gmail.com>2012-05-29 13:14:36 +0430
committerHedayat Vatankhah <hedayat.fwd@gmail.com>2012-05-29 13:14:36 +0430
commitf90dd00a0dc690a36c23f622b24b21a7c01c0fc7 (patch)
tree1471005bfcc61116f4a63c9d37d072423ec8f787
parentb92178558ad6c26d6eafdb9a97b2e2a98b710f26 (diff)
downloadyum-fast-downloader-f90dd00a0dc690a36c23f622b24b21a7c01c0fc7.tar.gz
yum-fast-downloader-f90dd00a0dc690a36c23f622b24b21a7c01c0fc7.tar.xz
yum-fast-downloader-f90dd00a0dc690a36c23f622b24b21a7c01c0fc7.zip
Apparently, aria2 cannot read more than about 4080 characters of URLs from input file
-rw-r--r--yum-fast-downloader.py4
1 files changed, 4 insertions, 0 deletions
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)))