Add support for retrying failed connections, including adding a new --tries
option to change the default
#6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: Both PRs #4 & #5 are prerequisites for this PR and should be merged first.
This implements automatic retrying upon a network connection error (not an HTTP 4XX/5XX error), up to 20 times, by default. It also adds a new
--tries
option which accepts a number of times to try (including the first) to override the default of 20 retries.This further improves the reliability of the tool, plus helps if there have been any errors due to rate-limiting (see Issue #1).
Example usage:
./bin/wayback_machine_downloader --to 20120222134837 --tries 10 http://www.folklore.org/