mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03: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
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue