From 40dc0a2e5f6acf3f336246bc6f17b5a21cf6ce08 Mon Sep 17 00:00:00 2001 From: Dag Date: Sat, 9 Jul 2022 22:50:03 +0200 Subject: [PATCH] [Euronews] fix: use correct url (#2916) The non-www domain has a tls config error. --- bridges/EuronewsBridge.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bridges/EuronewsBridge.php b/bridges/EuronewsBridge.php index 2508a274..bce05f7c 100644 --- a/bridges/EuronewsBridge.php +++ b/bridges/EuronewsBridge.php @@ -13,9 +13,9 @@ class EuronewsBridge extends BridgeAbstract 'lang' => [ 'name' => 'Language', 'type' => 'list', - 'defaultValue' => 'euronews.com', + 'defaultValue' => 'www.euronews.com', 'values' => [ - 'English' => 'euronews.com', + 'English' => 'www.euronews.com', 'French' => 'fr.euronews.com', 'German' => 'de.euronews.com', 'Italian' => 'it.euronews.com', @@ -48,7 +48,11 @@ class EuronewsBridge extends BridgeAbstract public function collectData() { $limit = $this->getInput('limit'); - $root_url = 'https://' . $this->getInput('lang'); + $lang = $this->getInput('lang'); + if ($lang === 'euronews.com') { + $lang = 'www.euronews.com'; + } + $root_url = 'https://' . $lang; $url = $root_url . '/api/timeline.json?limit=' . $limit; $json = getContents($url); $data = json_decode($json, true);