update double tweet & other scripts to new code
This commit is contained in:
@@ -38,7 +38,11 @@ def filter_posts_for_week(posts, start_date, end_date):
|
||||
return filtered_posts
|
||||
|
||||
def generate_intro_tweet(author):
|
||||
author_handle = author["handle"]
|
||||
credentials = next((cred for cred in X_API_CREDENTIALS if cred["username"] == author["username"]), None)
|
||||
if not credentials:
|
||||
logging.error(f"No X credentials found for {author['username']}")
|
||||
return None
|
||||
author_handle = credentials["x_username"]
|
||||
prompt = (
|
||||
f"Generate a concise tweet (under 280 characters) for {author_handle}. "
|
||||
f"Introduce a thread of their top 10 foodie posts of the week on InsiderFoodie.com. "
|
||||
|
||||
Reference in New Issue
Block a user