From 0eac7a078479eac48be6c841a79f77ff04f429a8 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Sun, 16 Jun 2024 13:16:42 +0200 Subject: [PATCH] [HeiseBridge] Remove lost+found icon Remove the icon visible in l+f articles, e.g. https://www.heise.de/news/l-f-DISGOMOJI-die-Linux-Malware-die-auf-Emojis-steht-9765024.html Using a css selector in the form img[alt*="l+f"] was tried, but is not supported by the used library. --- bridges/HeiseBridge.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bridges/HeiseBridge.php b/bridges/HeiseBridge.php index e26a4607..82c1f1aa 100644 --- a/bridges/HeiseBridge.php +++ b/bridges/HeiseBridge.php @@ -166,6 +166,11 @@ class HeiseBridge extends FeedExpander ) { $element->remove(); } + foreach ($article->find('img') as $element) { + if (str_contains($element->alt, 'l+f')) { + $element->remove(); + } + } // reload html, as remove() is buggy $article = str_get_html($article->outertext);