Revert "remove double cta"

This reverts commit e2c47a1a05.
This commit is contained in:
2025-05-03 13:58:44 +10:00
parent 49f192d6d8
commit b025afe9f3
4 changed files with 25 additions and 51 deletions
+13 -1
View File
@@ -49,9 +49,21 @@ def get_viral_share_prompt(article_title, content):
temperature=0.9
)
share_prompt = response.choices[0].message.content.strip()
# Remove any leading or trailing quotation marks
share_prompt = share_prompt.strip('"\'')
logging.info(f"Generated viral share prompt: {share_prompt}")
return share_prompt
except Exception as e:
logging.error(f"Viral share prompt generation failed: {e}")
return "Love This? Share It"
return "Love This? Share It"
def select_best_cta(title, content, post_url=None):
cta_templates = [
"Love This Foodie Find Hit That Like Button",
"Think This Dish Is a Game Changer Show Some Love With a Like",
"Hungry for More Foodie Insights Follow Us for the Latest Trends",
"Dont Miss Out on Foodie Updates Follow Us Today"
]
cta = random.choice(cta_templates)
return cta