Compare commits
2 commits
945844712f
...
c0c00a0759
Author | SHA1 | Date | |
---|---|---|---|
c0c00a0759 | |||
dc28c29c6f |
1 changed files with 4 additions and 2 deletions
6
main.py
6
main.py
|
@ -107,8 +107,8 @@ class Listener(StreamingClient):
|
||||||
if keys["VERBOSE"]:
|
if keys["VERBOSE"]:
|
||||||
print("Thread...", end=" ")
|
print("Thread...", end=" ")
|
||||||
base_tweet = self.client.get_tweet(id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data
|
base_tweet = self.client.get_tweet(id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data
|
||||||
base_author = self._get_user(base_tweet.author_id)
|
# If we have an author ID, the author account is in private
|
||||||
if base_author.protected:
|
if base_tweet.author_id:
|
||||||
if keys["VERBOSE"]:
|
if keys["VERBOSE"]:
|
||||||
print("Auteur du premier tweet en privé, pas de réponses.")
|
print("Auteur du premier tweet en privé, pas de réponses.")
|
||||||
return
|
return
|
||||||
|
@ -307,6 +307,8 @@ def create_rules(tracked_users: list[str]) -> list[str]:
|
||||||
# Buffer
|
# Buffer
|
||||||
buffer = repeat
|
buffer = repeat
|
||||||
|
|
||||||
|
tracked_users.sort()
|
||||||
|
|
||||||
# Track users
|
# Track users
|
||||||
for user in tracked_users:
|
for user in tracked_users:
|
||||||
# Check if the rule don't exceeds the maximum length of a rule (512)
|
# Check if the rule don't exceeds the maximum length of a rule (512)
|
||||||
|
|
Reference in a new issue