Skip to content

Commit

Permalink
[TarnkappeBridge] changed "unwanted stuff" (#4206)
Browse files Browse the repository at this point in the history
* [TarnkappeBridge] changed "unwanted stuff"

em was removed because the annoying affiliate info, but it also deleted the text from blockquotes.

The p-element with the affiliate info has no attributes like class, but it is the only p-element with a style-attribute, so I used this to identify it.

* Update TarnkappeBridge.php

removed whitespace

* Update TarnkappeBridge.php

don't know why I did it twice before
  • Loading branch information
Tone866 authored Aug 9, 2024
1 parent f358f1a commit adcc8e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bridges/TarnkappeBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ private function addArticleToItem($item, $article)

// remove unwanted stuff
foreach (
$article->find('em, section, div.menu') as $element
$article->find('section, div.menu, p[style]') as $element
) {
$element->remove();
}

// reload html, as remove() is buggy
$article = str_get_html($article->outertext);

Expand Down

0 comments on commit adcc8e3

Please sign in to comment.