mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-21 17:15:25 +03:00
[GolemBridge] fix youtube links (#4144)
This commit is contained in:
parent
8bf1537054
commit
4539eb69aa
1 changed files with 3 additions and 3 deletions
|
@ -109,10 +109,10 @@ class GolemBridge extends FeedExpander
|
|||
//built youtube iframes
|
||||
foreach ($article->find('.embedcontent') as &$embedcontent) {
|
||||
$ytscript = $embedcontent->find('script', 0);
|
||||
if (preg_match('/www.youtube.com.*?\"/', $ytscript->innertext, $link)) {
|
||||
$link = 'https://' . str_replace('\\', '', $link[0]);
|
||||
if (preg_match('/(www.youtube.com.*?)\"/', $ytscript->innertext, $link)) {
|
||||
$link = 'https://' . str_replace('\\', '', $link[1]);
|
||||
$embedcontent->innertext .= <<<EOT
|
||||
<iframe width="560" height="315" src=$link title="YouTube video player" frameborder="0"
|
||||
<iframe width="560" height="315" src="$link" title="YouTube video player" frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>';
|
||||
EOT;
|
||||
|
|
Loading…
Reference in a new issue