diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 44e062fc..380bcc70 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -135,7 +135,8 @@ class Extractor(): raise ValueError("Either 'seconds' or 'until' is required") if reason: - isotime = until.time().isoformat("seconds") + t = until.time() + isotime = "{:02}:{:02}:{:02}".format(t.hour, t.minute, t.second) self.log.info("Waiting until %s for %s.", isotime, reason) time.sleep(seconds + adjust) diff --git a/gallery_dl/extractor/tumblr.py b/gallery_dl/extractor/tumblr.py index 425d96ab..a1f21997 100644 --- a/gallery_dl/extractor/tumblr.py +++ b/gallery_dl/extractor/tumblr.py @@ -407,11 +407,12 @@ class TumblrAPI(oauth.OAuth1API): # daily rate limit if response.headers.get("x-ratelimit-perday-remaining") == "0": reset = response.headers.get("x-ratelimit-perday-reset") - until = datetime.now() + timedelta(seconds=float(reset)) + t = (datetime.now() + timedelta(seconds=float(reset))).time() + self.log.error("Daily API rate limit exceeded") raise exception.StopExtraction( "Aborting - Rate limit will reset at %s", - until.time().isoformat("seconds")) + "{:02}:{:02}:{:02}".format(t.hour, t.minute, t.second)) # hourly rate limit reset = response.headers.get("x-ratelimit-perhour-reset")