1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-09-02 12:43:13 +02:00

[GolemBridge] fix youtube videos + remove empty div (#4696)

This commit is contained in:
Tone
2025-09-01 17:15:49 +02:00
committed by GitHub
parent 69ada73b93
commit 876b5045d9

View File

@@ -115,8 +115,8 @@ class GolemBridge extends FeedExpander
$article = $page->find('article', 0);
//built youtube iframes
foreach ($article->find('.embedcontent') as &$embedcontent) {
$ytscript = $embedcontent->find('script', 0);
foreach ($article->find('.go-embed-container') as &$embedcontent) {
$ytscript = $page->find('script', 14);
if (preg_match('/(www.youtube.com.*?)\"/', $ytscript->innertext, $link)) {
$link = 'https://' . str_replace('\\', '', $link[1]);
$embedcontent->innertext .= <<<EOT
@@ -141,7 +141,7 @@ class GolemBridge extends FeedExpander
foreach (
$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
.go-gallery .[data-active="false"], .go-article-header__series') as $bad
) {
$bad->remove();
}