1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-29 19:09:56 +02:00

[GolemBridge] Add and remove more stuff

Fix the inclusion of tables and add ul/ol elements.
This includes new unwanted stuff that is explicitly removed.
This commit is contained in:
Mynacol
2025-08-28 22:10:00 +00:00
parent 02c820155d
commit d00745c411

View File

@@ -139,8 +139,9 @@ class GolemBridge extends FeedExpander
// delete known bad elements and unwanted gallery images
foreach (
$article->find('div[id*="adtile"], #job-market, #seminars, iframe, .go-article-header__title, .go-article-header__kicker,
.gbox_affiliate, div.toc, .go-button-bar, .go-alink-list, .go-teaser-block, .go-vh, .go-gallery .[data-active="false"]') as $bad
$article->find('div[id*="adtile"], #job-market, #seminars, iframe, .go-article-header__title, .go-article-header__kicker, .go-label--sponsored,
.gbox_affiliate, div.toc, .go-button-bar, .go-alink-list, .go-teaser-block, .go-vh, .go-paywall, .go-index-link, .go-pagination__list,
.go-gallery .[data-active="false"]') as $bad
) {
$bad->remove();
}
@@ -165,8 +166,8 @@ class GolemBridge extends FeedExpander
}
foreach (
$article->find('div.go-article-header__intro, p, h1, h2, h3, pre, .go-media img[src*="."], .go-media figcaption,
div[class*="golem_tablediv"], iframe, video') as $element
$article->find('div.go-article-header__intro, p, h1, h2, h3, pre, ul, ol, .go-media img[src*="."], .go-media figcaption,
table, iframe, video') as $element
) {
if (!str_contains($prevcontent, $element)) {
$item .= $element;