[HeiseBridge] Remove additional ad banners

For example
https://www.heise.de/meinung/Kommentar-Microsofts-Sicherheitspraxis-wird-zur-Gefahr-und-das-BSI-schweigt-9686629.html
has two inline banners for a heise offering, not directly related to the
article. Removing all "inline" figures, which seems to catch all inline
unwanted elements, while avoiding removing useful figures/images.
This commit is contained in:
Mynacol 2024-04-18 13:18:45 +02:00
parent 8c3e973b9f
commit 1f71d76ac1

View file

@ -160,7 +160,10 @@ class HeiseBridge extends FeedExpander
$article = defaultLinkTo($article, $item['uri']);
// remove unwanted stuff
foreach ($article->find('figure.branding, a-ad, div.ho-text, a-img, .a-toc__list, a-collapse, .opt-in__description, .opt-in__footnote') as $element) {
foreach (
$article->find('figure.branding, figure.a-inline-image, a-ad, div.ho-text, a-img,
.a-toc__list, a-collapse, .opt-in__description, .opt-in__footnote') as $element
) {
$element->remove();
}
// reload html, as remove() is buggy