fix: news api url
All checks were successful
kipp-news/pipeline/head This commit looks good

This commit is contained in:
wpetit 2025-02-02 19:38:27 +01:00
parent fd4dbec9c9
commit 248cfede9e

View File

@ -112,7 +112,7 @@ function include_news_api_latest_week {
local query=$2 local query=$2
local total=$3 local total=$3
local since=$(date -d '- 7 days' +%Y-%m-%d) local since=$(date -d '- 7 days' +%Y-%m-%d)
local news_of_the_week=$(curl -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=$(curl -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 if [ -z "$news_of_the_week" ]; then
return return