try
This commit is contained in:
+1
-1
@@ -1159,7 +1159,7 @@ def get_flickr_image(search_query, relevance_keywords, main_topic, specific_term
|
||||
|
||||
watermark_domains = [
|
||||
'shutterstock.com', 'gettyimages.com', 'istockphoto.com', 'adobestock.com',
|
||||
'123rf.com', 'dreamstime.com', 'alamy.com', 'stock.adobe.com'
|
||||
'123rf.com', 'dreamstime.com', 'alamy.com', 'stock.adobe.com', 'bigstockphoto.com'
|
||||
]
|
||||
if any(domain in image_url.lower() or domain in page_url.lower() for domain in watermark_domains):
|
||||
logger.info(f"Skipping image from stock photo site (potential watermark): {image_url}")
|
||||
|
||||
+2
-3
@@ -65,7 +65,6 @@ run_script() {
|
||||
else
|
||||
log "$script failed with exit code $exit_code"
|
||||
fi
|
||||
# Extract sleep time from the last line containing "sleep_time:"
|
||||
sleep_time=$(grep "sleep_time:" "$script_log" | tail -n 1 | grep -oP 'sleep_time: \K[0-9]+' || echo $((RANDOM % 601 + 1200)))
|
||||
log "$script completed, sleep_time: $sleep_time seconds"
|
||||
rm -f "$LOCK_DIR/${script_name}.lock"
|
||||
@@ -160,7 +159,7 @@ if [ "$1" == "start" ]; then
|
||||
fi
|
||||
for script in foodie_automator_rss.py foodie_automator_reddit.py foodie_automator_google.py; do
|
||||
if [ -f "$script" ]; then
|
||||
sleep_time=$(run_script "$script")
|
||||
sleep_time=$(run_script "$script" | tail -n 1)
|
||||
if [ -n "$sleep_time" ]; then
|
||||
log "Sleeping for $sleep_time seconds after $script"
|
||||
sleep "$sleep_time"
|
||||
@@ -215,7 +214,7 @@ else
|
||||
fi
|
||||
for script in foodie_automator_rss.py foodie_automator_reddit.py foodie_automator_google.py; do
|
||||
if [ -f "$script" ]; then
|
||||
sleep_time=$(run_script "$script")
|
||||
sleep_time=$(run_script "$script" | tail -n 1)
|
||||
if [ -n "$sleep_time" ]; then
|
||||
log "Sleeping for $sleep_time seconds after $script"
|
||||
sleep "$sleep_time"
|
||||
|
||||
Reference in New Issue
Block a user