|
|
|
@ -1174,7 +1174,7 @@ def get_flickr_image(search_query, relevance_keywords, main_topic, specific_term |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
# Check for website URLs in the image text |
|
|
|
# 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): |
|
|
|
if re.search(url_pattern, text): |
|
|
|
logger.info(f"Skipping image with embedded website URL: {image_url} (detected: {text})") |
|
|
|
logger.info(f"Skipping image with embedded website URL: {image_url} (detected: {text})") |
|
|
|
return None |
|
|
|
return None |
|
|
|
|