mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[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:
parent
8c3e973b9f
commit
1f71d76ac1
@ -160,7 +160,10 @@ class HeiseBridge extends FeedExpander
|
|||||||
$article = defaultLinkTo($article, $item['uri']);
|
$article = defaultLinkTo($article, $item['uri']);
|
||||||
|
|
||||||
// remove unwanted stuff
|
// 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();
|
$element->remove();
|
||||||
}
|
}
|
||||||
// reload html, as remove() is buggy
|
// reload html, as remove() is buggy
|
||||||
|
Loading…
Reference in New Issue
Block a user