From 83d5a8e70e480d11212d611631c211b452d50b07 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 6 Sep 2020 21:31:46 -0700 Subject: [PATCH] Fix retry loop not breaking after successful try! --- timesearch_modules/pushshift.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timesearch_modules/pushshift.py b/timesearch_modules/pushshift.py index aec92c1..c01c670 100644 --- a/timesearch_modules/pushshift.py +++ b/timesearch_modules/pushshift.py @@ -117,6 +117,8 @@ def _pagination_core(url, params, dummy_type, lower=None, upper=None): traceback.print_exc() print('Retrying in 5...') time.sleep(5) + else: + break batch_ids = setify(batch) if len(batch_ids) == 0 or batch_ids.issubset(prev_batch_ids):