From 85b4bfe93929d912db192ae39756f958493eaeb4 Mon Sep 17 00:00:00 2001 From: muskit <15199219+muskit@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:20:23 -0700 Subject: [PATCH] add condition for unavailable tweet --- src/scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scraper.py b/src/scraper.py index c350251..042444b 100644 --- a/src/scraper.py +++ b/src/scraper.py @@ -101,7 +101,7 @@ class Scraper: self.login_wait(private_user) except UnknownError as e: print(f"UnknownError occurred: {e.message.rstrip()}") - if "_Missing" in e.message: # tweet is probably unavailable + if any(x in e.message.lower() for x in ["missing", "post is unavailable"]) : # tweet is probably unavailable print(f"tweet {id} seems unavailable; skipping...") return None print("treating like RateLimitReached and using the next scraper...")