1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-09-11 16:22:24 +02:00

Print how many requests were made on 429

This commit is contained in:
Alexander Graf 2018-09-06 09:17:38 +02:00
parent e248020927
commit 325e89c4b2

View File

@ -306,6 +306,7 @@ class InstaloaderContext:
if isinstance(err, TooManyRequestsException):
print(textwrap.fill(text_for_429), file=sys.stderr)
if is_graphql_query:
print("Made {} GraphQL requests.".format(len(self.query_timestamps)), file=sys.stderr)
waittime = graphql_query_waittime(untracked_queries=True)
if waittime > 0:
self.log('The request will be retried in {} seconds, at {:%H:%M}.'