update posted_rss_titles.json
This commit is contained in:
@@ -46,6 +46,15 @@ RATE_LIMIT_DELAY = 1 # Delay between API calls in seconds
|
|||||||
FEED_TIMEOUT = 30 # Timeout for feed requests in seconds
|
FEED_TIMEOUT = 30 # Timeout for feed requests in seconds
|
||||||
MAX_RETRIES = 3 # Maximum number of retries for failed requests
|
MAX_RETRIES = 3 # Maximum number of retries for failed requests
|
||||||
|
|
||||||
|
POSTED_TITLES_FILE = '/home/shane/foodie_automator/posted_rss_titles.json'
|
||||||
|
USED_IMAGES_FILE = '/home/shane/foodie_automator/used_images.json'
|
||||||
|
EXPIRATION_HOURS = 24
|
||||||
|
IMAGE_EXPIRATION_DAYS = 7
|
||||||
|
|
||||||
|
posted_titles_data = load_json_file(POSTED_TITLES_FILE, EXPIRATION_HOURS)
|
||||||
|
posted_titles = set(entry["title"] for entry in posted_titles_data)
|
||||||
|
used_images = set(entry["title"] for entry in load_json_file(USED_IMAGES_FILE, IMAGE_EXPIRATION_DAYS) if "title" in entry)
|
||||||
|
|
||||||
def setup_logging():
|
def setup_logging():
|
||||||
"""Configure logging with rotation and cleanup."""
|
"""Configure logging with rotation and cleanup."""
|
||||||
if os.path.exists(LOG_FILE):
|
if os.path.exists(LOG_FILE):
|
||||||
|
|||||||
Reference in New Issue
Block a user