merge posting x into main files
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# foodie_automator_google.py
|
||||
import requests
|
||||
import random
|
||||
import time
|
||||
@@ -19,18 +20,20 @@ from selenium.common.exceptions import TimeoutException
|
||||
from duckduckgo_search import DDGS
|
||||
from foodie_config import (
|
||||
AUTHORS, RECIPE_KEYWORDS, PROMO_KEYWORDS, HOME_KEYWORDS, PRODUCT_KEYWORDS,
|
||||
SUMMARY_PERSONA_PROMPTS, CATEGORIES, CTAS, get_clean_source_name
|
||||
PERSONA_CONFIGS, CATEGORIES, CTAS, get_clean_source_name, X_API_CREDENTIALS
|
||||
)
|
||||
from foodie_utils import (
|
||||
load_json_file, save_json_file, get_image, generate_image_query,
|
||||
upload_image_to_wp, select_best_persona, determine_paragraph_count, is_interesting,
|
||||
generate_title_from_summary, summarize_with_gpt4o, generate_category_from_summary, post_to_wp,
|
||||
prepare_post_data, smart_image_and_filter, insert_link_naturally, get_flickr_image_via_ddg
|
||||
upload_image_to_wp, select_best_persona, determine_paragraph_count,
|
||||
is_interesting, generate_title_from_summary, summarize_with_gpt4o,
|
||||
generate_category_from_summary, post_to_wp, prepare_post_data,
|
||||
smart_image_and_filter, insert_link_naturally, get_flickr_image_via_ddg
|
||||
)
|
||||
from foodie_hooks import get_dynamic_hook, select_best_cta
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Flag to indicate if we're in the middle of posting
|
||||
is_posting = False
|
||||
|
||||
@@ -187,7 +190,7 @@ def curate_from_google_trends(geo_list=['US']):
|
||||
attempts = 0
|
||||
max_attempts = 10
|
||||
while attempts < max_attempts and trends:
|
||||
trend = trends.pop(0) # Take highest-volume trend
|
||||
trend = trends.pop(0)
|
||||
title = trend["title"]
|
||||
link = trend["link"]
|
||||
search_volume = trend["search_volume"]
|
||||
|
||||
Reference in New Issue
Block a user