Compare commits

...
4 Commits
Author SHA1 Message Date
Alexander Graf eecaca7c7b Release of version 3.3.9 2018-04-18 16:25:53 +02:00
Alexander Graf 729aa31d86 Reverse story download order to enable fast-update
Fixes #100.
2018-04-18 16:24:47 +02:00
Alexander Graf 94df60292e Fix bug about 429 handling
It caused Instaloader to fail with a TypeError on 429 Too Many Requests.
2018-04-18 16:24:20 +02:00
Alexander Graf 09f2eb3601 Set GRAPHQL_PAGE_LENGTH to 12
This is the length the browser requests. Might alleviate #94.
2018-04-18 11:41:00 +02:00
+5 -4
View File
@@ -31,7 +31,7 @@ import requests.utils
import urllib3
__version__ = '3.3.8'
__version__ = '3.3.9'
# NOTE: duplicated in README.rst and docs/index.rst
USAGE_STRING = """
@@ -460,7 +460,7 @@ class _PathPattern(str):
class Instaloader:
GRAPHQL_PAGE_LENGTH = 200
GRAPHQL_PAGE_LENGTH = 12
def __init__(self,
sleep: bool = True, quiet: bool = False,
@@ -663,7 +663,8 @@ class Instaloader:
if isinstance(err, TooManyRequests):
print(textwrap.fill(text_for_429), file=sys.stderr)
if is_graphql_query:
waittime = graphql_query_waittime(query_id=params['query_id'], untracked_queries=True)
query_id = params['query_id'] if 'query_id' in params else params['query_hash']
waittime = graphql_query_waittime(query_id, untracked_queries=True)
if waittime > 0:
self._log('The request will be retried in {} seconds.'.format(waittime))
time.sleep(waittime)
@@ -1161,7 +1162,7 @@ class Instaloader:
self._log("Retrieving stories from profile {}.".format(name))
totalcount = len(user_stories["items"])
count = 1
for item in user_stories["items"]:
for item in reversed(user_stories["items"]):
self._log("[%3i/%3i] " % (count, totalcount), end="", flush=True)
count += 1
with self._error_catcher('Download story from user {}'.format(name)):