projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a42db08
)
Handle empty pages in ItemIterator
author
Harmon
<Harmon758@gmail.com>
Sun, 25 Aug 2019 09:23:56 +0000
(
04:23
-0500)
committer
Harmon
<Harmon758@gmail.com>
Sun, 25 Aug 2019 09:23:56 +0000
(
04:23
-0500)
tweepy/cursor.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/cursor.py
b/tweepy/cursor.py
index c9282085ada68e5e3809a3659d8a01b341f62f43..2140ac7dbb1dfca2f1a099916bbc8bb45c42823f 100644
(file)
--- a/
tweepy/cursor.py
+++ b/
tweepy/cursor.py
@@
-217,6
+217,8
@@
class ItemIterator(BaseIterator):
if self.current_page is None or self.page_index == len(self.current_page) - 1:
# Reached end of current page, get the next page...
self.current_page = self.page_iterator.next()
+ while len(self.current_page) == 0:
+ self.current_page = self.page_iterator.next()
self.page_index = -1
self.page_index += 1
self.num_tweets += 1