Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -153,14 +153,8 @@ def block_user(user_id, user, reason):
|
|
| 153 |
client.block(target_user_id=user_id)
|
| 154 |
print("User blocked")
|
| 155 |
except tweepy.errors.TooManyRequests as e:
|
| 156 |
-
|
| 157 |
-
print(
|
| 158 |
-
time.sleep(10)
|
| 159 |
-
attempts = attempts + 1
|
| 160 |
-
if attempts > 7:
|
| 161 |
-
finished = True
|
| 162 |
-
blocked = False
|
| 163 |
-
continue
|
| 164 |
except tweepy.errors.BadRequest as e:
|
| 165 |
print("bad request error")
|
| 166 |
print(e)
|
|
|
|
| 153 |
client.block(target_user_id=user_id)
|
| 154 |
print("User blocked")
|
| 155 |
except tweepy.errors.TooManyRequests as e:
|
| 156 |
+
client.mute(target_user_id=user_id)
|
| 157 |
+
print("Could not block, so muted")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
except tweepy.errors.BadRequest as e:
|
| 159 |
print("bad request error")
|
| 160 |
print(e)
|