Reputation: 437
I have a question about using mirror() in LWP::UserAgent
. Does it wait for the file to finish downloading before proceeding with the rest of the script? (so if I have a for loop with, say 10 urls, will it try to download all 10 at once? or will it download the first, then wait until completion, and then download the next one etc?) I am asking because I am downloading many files and I do not want to overload the server, and am curious if I should put in a pause.
If it doesn't wait, is there a quick way to determine if the file is finished downloading instead of choosing an arbitrary length of time to sleep
?
Thanks in advance.
Upvotes: 2
Views: 987
Reputation: 63892
If you use LWP without any special handling, yes, will w8 for download finish. Here is an old LWP::Parallel::UserAgent what can parallel downloading.
Upvotes: 1