Skip to content

Commit

Permalink
Handle no-clobber before delay
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed May 1, 2024
1 parent c2476fd commit 6dc2dcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions waybackpack/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ def download_to(
)

for i, asset in enumerate(tqdm(self.assets) if progress else self.assets):
if i > 0 and delay:
logger.info("Sleeping {0} seconds".format(delay))
time.sleep(delay)

path_head, path_tail = os.path.split(self.parsed_url.path)
if path_tail == "":
path_tail = "index.html"
Expand All @@ -103,6 +99,10 @@ def download_to(
):
continue

if i > 0 and delay:
logger.info("Sleeping {0} seconds".format(delay))
time.sleep(delay)

logger.info(
"Fetching {0} @ {1}".format(asset.original_url, asset.timestamp)
)
Expand Down

0 comments on commit 6dc2dcf

Please sign in to comment.