X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FOEmbed.php;h=dbba99fcffa5238d31c98a0d33a892ffa34eab30;hb=65b86fe0d556829c09e8c8f5c707b868ad37dfe1;hp=5390a4bc5730165c503a2cb4c4f8612b05221975;hpb=5a87ccf0261733096f634cb03314604891e5f48a;p=friendica.git diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index 5390a4bc57..dbba99fcff 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -1,6 +1,6 @@ fetch($embedurl, 15, 'text/*'); + $html_text = DI::httpClient()->fetch($embedurl, HttpClientAccept::HTML, 15); if (!empty($html_text)) { $dom = new DOMDocument(); if (@$dom->loadHTML($html_text)) { @@ -111,7 +112,7 @@ class OEmbed // but their OEmbed endpoint is only accessible by HTTPS ¯\_(ツ)_/¯ $href = str_replace(['http://www.youtube.com/', 'http://player.vimeo.com/'], ['https://www.youtube.com/', 'https://player.vimeo.com/'], $href); - $result = DI::httpRequest()->fetchFull($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth')); + $result = DI::httpClient()->fetchFull($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth')); if ($result->getReturnCode() === 200) { $json_string = $result->getBody(); break; @@ -236,14 +237,14 @@ class OEmbed break; case "photo": - $ret .= ''; + $ret .= ''; break; case "link": break; case "rich": - $ret .= ProxyUtils::proxifyHtml($oembed->html); + $ret .= Proxy::proxifyHtml($oembed->html); break; }