From 599d352cbdd14a9bfba9afaabaa8ff54e896247d Mon Sep 17 00:00:00 2001 From: Shane Date: Wed, 14 May 2025 10:15:24 +1000 Subject: [PATCH] fix image error, and requirements file --- foodie_utils.py | 2 +- manage_scripts.sh | 2 +- requirements.txt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/foodie_utils.py b/foodie_utils.py index 8af19a7..e13b444 100644 --- a/foodie_utils.py +++ b/foodie_utils.py @@ -1174,7 +1174,7 @@ def get_flickr_image(search_query, relevance_keywords, main_topic, specific_term return None # Check for website URLs in the image text - url_pattern = r'(?:https?://)?(?:www\.)?[\w-]+\.(?:com|org|net|edu|gov|co\.uk|io)(?:/[\w-./?%&=]*)?' + url_pattern = r'(?:https?://)?(?:www\.)?[\w\-]+\.(?:com|org|net|edu|gov|co\.uk|io)(?:/[\w\-./?%&=]*)?' if re.search(url_pattern, text): logger.info(f"Skipping image with embedded website URL: {image_url} (detected: {text})") return None diff --git a/manage_scripts.sh b/manage_scripts.sh index 35818d2..ba0c748 100755 --- a/manage_scripts.sh +++ b/manage_scripts.sh @@ -68,7 +68,7 @@ if [ "$1" == "start" ]; then else log "Script foodie_engagement_generator.py not found" fi - # Start foodie_weekly_thread.py + # Start foodie_weekly_thread.py (commented out to prevent execution) #if [ -f "foodie_weekly_thread.py" ]; then # if ! check_running "foodie_weekly_thread"; then # log "Running foodie_weekly_thread.py..." diff --git a/requirements.txt b/requirements.txt index 8182b8d..f4a8d67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,8 +8,8 @@ Pillow==11.1.0 pytesseract==0.3.13 feedparser==6.0.11 webdriver-manager==4.0.2 -tweepy==4.14.0 -python-dotenv==1.0.1 -flickr-api==0.7.1 +tweepy==4.15.0 +python-dotenv==1.1.0 +flickr-api==0.7.7 filelock==3.16.1 requests-oauthlib==2.0.0 \ No newline at end of file