From d4f104b8a61987d31e19c2042884e52812fd6b84 Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Fri, 16 Aug 2013 13:04:04 -0500 Subject: [PATCH] fixed problem where cursor stops after 10k results --- twython/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twython/api.py b/twython/api.py index 3a32deb..44da1b2 100644 --- a/twython/api.py +++ b/twython/api.py @@ -398,9 +398,6 @@ class Twython(EndpointsMixin, object): if not content: raise StopIteration - if function.iter_mode == 'cursor' and content['next_cursor_str'] == '0': - raise StopIteration - if hasattr(function, 'iter_key'): results = content.get(function.iter_key) else: @@ -409,6 +406,9 @@ class Twython(EndpointsMixin, object): for result in results: yield result + if function.iter_mode == 'cursor' and content['next_cursor_str'] == '0': + raise StopIteration + try: if function.iter_mode == 'id': if not 'max_id' in params: