parallel-dl is a library for downloading files in parallel.
- Go 1.7 or newer
parallel-dl allows you to control these features:
- HTTP Timeouts
- Maximum number of concurrent requests
- Maximum number of errors before giving up the whole requests
- Maximum number of retries before giving up a request
Download()
That's all !
opt := ¶lleldl.Options{
Output: "/path/to/download",
MaxConcurrents: 2,
MaxErrorRequests: 1,
MaxAttempts: 4,
}
client, err := paralleldl.New(opt)
if err != nil {
log.Fatal(err)
}
lists := []string{
"http://example.com/file1",
"http://example.com/file2",
"http://example.com/file3",
"http://example.com/file4",
}
errCnt := client.Download(lists)
opt := ¶lleldl.Options{
Output: "/path/to/download",
}
The MIT License
Yoshiki Nakagawa