|
|
|
@ -99,7 +99,7 @@ except Exception as e: |
|
|
|
|
|
|
|
|
|
|
|
def generate_intro_tweet(author): |
|
|
|
def generate_intro_tweet(author): |
|
|
|
"""Generate an intro tweet for the weekly thread.""" |
|
|
|
"""Generate an intro tweet for the weekly thread.""" |
|
|
|
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: |
|
|
|
if not credentials: |
|
|
|
logging.error(f"No X credentials found for {author['username']}") |
|
|
|
logging.error(f"No X credentials found for {author['username']}") |
|
|
|
return None |
|
|
|
return None |
|
|
|
@ -145,7 +145,7 @@ def generate_intro_tweet(author): |
|
|
|
|
|
|
|
|
|
|
|
def generate_final_cta(author): |
|
|
|
def generate_final_cta(author): |
|
|
|
"""Generate a final CTA tweet for the weekly thread using GPT.""" |
|
|
|
"""Generate a final CTA tweet for the weekly thread using GPT.""" |
|
|
|
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: |
|
|
|
if not credentials: |
|
|
|
logging.error(f"No X credentials found for {author['username']}") |
|
|
|
logging.error(f"No X credentials found for {author['username']}") |
|
|
|
return None |
|
|
|
return None |
|
|
|
|