mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[GolemBridge] fix for internal videos (#4051)
* [GolemBridge] fix for internal videos with this internal golem-videos can be played directly from feed * Update GolemBridge.php
This commit is contained in:
parent
fb66775ece
commit
f736da6fae
@ -119,6 +119,16 @@ class GolemBridge extends FeedExpander
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//built golem videos
|
||||||
|
foreach ($article->find('.gvideofig') as &$embedcontent) {
|
||||||
|
if (preg_match('/gvideo_(.*)/', $embedcontent->id, $videoid)) {
|
||||||
|
$embedcontent->innertext .= <<<EOT
|
||||||
|
<video class="rmp-object-fit-contain rmp-video" x-webkit-airplay="allow" controlslist="nodownload" tabindex="-1"
|
||||||
|
preload="metadata" src="https://video.golem.de/download/$videoid[1]"></video>
|
||||||
|
EOT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// delete known bad elements
|
// delete known bad elements
|
||||||
foreach (
|
foreach (
|
||||||
$article->find('div[id*="adtile"], #job-market, #seminars, iframe,
|
$article->find('div[id*="adtile"], #job-market, #seminars, iframe,
|
||||||
@ -142,7 +152,7 @@ class GolemBridge extends FeedExpander
|
|||||||
$img->src = $img->getAttribute('data-src-full');
|
$img->src = $img->getAttribute('data-src-full');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($content->find('p, h1, h2, h3, img[src*="."], iframe') as $element) {
|
foreach ($content->find('p, h1, h2, h3, img[src*="."], iframe, video') as $element) {
|
||||||
$item .= $element;
|
$item .= $element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user