diff --git a/cazette.md b/cazette.md new file mode 100644 index 0000000..e69de29 diff --git a/generate-newsletter.sh b/generate-newsletter.sh index 2eb2b27..53c556d 100755 --- a/generate-newsletter.sh +++ b/generate-newsletter.sh @@ -131,7 +131,7 @@ function include_news_api_latest_week { local query=$2 local total=$3 local since=$(date -d '- 7 days' +%Y-%m-%d) - local news_of_the_week=$(scrape -sk --retry 5 -H "X-Api-Key: ${NEWS_API_KEY}" -H 'User-Agent: Cazette/1.0' "https://api.newsdatahub.com/v1/news?language=fr&topic=technology&topic=business&topic=politics&topic=education&topic=innovation&topic=internet&q=${query}&start_date=${since}" | jq '.data') + local news_of_the_week=$(scrape -sk --retry 5 -H "X-Api-Key:${NEWS_API_KEY}" -H 'User-Agent:Cazette/1.0' "https://api.newsdatahub.com/v1/news?language=fr&topic=technology&topic=business&topic=politics&topic=education&topic=innovation&topic=internet&q=${query}&start_date=${since}" | jq '.data') if [ -z "$news_of_the_week" ]; then return