mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 13:18:28 +03:00
Catch edge case to ensure iterator is reached in instagram_tbot_extractor.py
This commit is contained in:
@@ -104,7 +104,7 @@ class InstagramTbotExtractor(Extractor):
|
|||||||
message = ""
|
message = ""
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
# media is added before text by the bot so it can be used as a stop-logic mechanism
|
# media is added before text by the bot so it can be used as a stop-logic mechanism
|
||||||
while attempts < (self.timeout - 3) and (not message or not len(seen_media)):
|
while attempts < max(self.timeout - 3, 3) and (not message or not len(seen_media)):
|
||||||
attempts += 1
|
attempts += 1
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
for post in self.client.iter_messages(chat, min_id=since_id):
|
for post in self.client.iter_messages(chat, min_id=since_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user