dictionary structure of X_API_CREDENTIALS
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ def post_tweet(author, tweet, reply_to_id=None):
|
||||
import tweepy
|
||||
from datetime import datetime, timezone
|
||||
|
||||
credentials = next((cred for cred in X_API_CREDENTIALS if cred["username"] == author["username"]), None)
|
||||
credentials = X_API_CREDENTIALS.get(author["username"])
|
||||
if not credentials:
|
||||
logging.error(f"No X credentials found for {author['username']}")
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user