From 55b36b0455e5f2b808e927c553b880a9eb78cf0a Mon Sep 17 00:00:00 2001 From: Corentin Garcia Date: Sun, 9 Sep 2018 21:23:59 +0200 Subject: [PATCH] [DauphineLibereBridge] Use https, fix content parsing (fix issue #780) (#811) --- bridges/DauphineLibereBridge.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bridges/DauphineLibereBridge.php b/bridges/DauphineLibereBridge.php index 7547d740..20c82070 100644 --- a/bridges/DauphineLibereBridge.php +++ b/bridges/DauphineLibereBridge.php @@ -3,7 +3,7 @@ class DauphineLibereBridge extends FeedExpander { const MAINTAINER = 'qwertygc'; const NAME = 'Dauphine Bridge'; - const URI = 'http://www.ledauphine.com/'; + const URI = 'https://www.ledauphine.com/'; const CACHE_TIMEOUT = 7200; // 2h const DESCRIPTION = 'Returns the newest articles.'; @@ -49,8 +49,9 @@ class DauphineLibereBridge extends FeedExpander { private function extractContent($url){ $html2 = getSimpleHTMLDOMCached($url); - $text = $html2->find('div.column', 0)->innertext; - $text = preg_replace('@]*?>.*?@si', '', $text); - return $text; + foreach ($html2->find('.noprint, link, script, iframe, .shareTool, .contentInfo') as $remove) { + $remove->outertext = ''; + } + return $html2->find('div.content', 0)->innertext; } }