From 24bd19cb018a573097bfafe7518580c4f0f497ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20=C3=98rb=C3=A6k=20Chemnitz?= Date: Thu, 21 Dec 2023 23:05:51 +0100 Subject: [PATCH] banned on unknown auth error --- twscrape/queue_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twscrape/queue_client.py b/twscrape/queue_client.py index 50415bd..ca1a9f1 100644 --- a/twscrape/queue_client.py +++ b/twscrape/queue_client.py @@ -173,7 +173,8 @@ class QueueClient: if rep.status_code == 200 and "_Missing: No status found with that ID." in msg: return # ignore this error - if rep.status_code == 200 and "Authorization: Denied by access control: unspecified reason" in msg: + if rep.status_code == 200 and "Authorization" in msg: + await self._close_ctx(-1, banned=True, msg=msg) raise UnknownAuthorizationError(msg) # todo: (32) Could not authenticate you