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-06-05 00:42:04 +0430
commit4988526c99cc10721c3b2bc97f2fc57a5e6e7bfb (patch)
tree5802bac804f880798e85defce6cd2110f65838cb
parentb1cb67495e552c297e62bd624cc8b298f8d09b4f (diff)
downloadyum-fast-downloader-4988526c99cc10721c3b2bc97f2fc57a5e6e7bfb.tar.gz
yum-fast-downloader-4988526c99cc10721c3b2bc97f2fc57a5e6e7bfb.tar.xz
yum-fast-downloader-4988526c99cc10721c3b2bc97f2fc57a5e6e7bfb.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 b012c53..49e9918 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)))