]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/OEmbed.php
NL translation update THX casperrutten33
[friendica.git] / src / Content / OEmbed.php
index 8cfb8ce0a129e5249a4a61240621db716d1373cf..30a113f461414b336fc37dafa3ef0af345aa0204 100644 (file)
@@ -31,7 +31,6 @@ use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
 use Friendica\Database\DBA;
 use Friendica\DI;
-use Friendica\Network\HTTPRequest;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
 use Friendica\Util\ParseUrl;
@@ -96,7 +95,7 @@ class OEmbed
 
                        if (!in_array($ext, $noexts)) {
                                // try oembed autodiscovery
-                               $html_text = HTTPRequest::fetchUrl($embedurl, false, 15, 'text/*');
+                               $html_text = DI::httpRequest()->fetch($embedurl, false, 15, 'text/*');
                                if ($html_text) {
                                        $dom = @DOMDocument::loadHTML($html_text);
                                        if ($dom) {
@@ -104,14 +103,14 @@ class OEmbed
                                                $entries = $xpath->query("//link[@type='application/json+oembed']");
                                                foreach ($entries as $e) {
                                                        $href = $e->getAttributeNode('href')->nodeValue;
-                                                       $json_string = HTTPRequest::fetchUrl($href . '&maxwidth=' . $a->videowidth);
+                                                       $json_string = DI::httpRequest()->fetch($href . '&maxwidth=' . $a->videowidth);
                                                        break;
                                                }
 
                                                $entries = $xpath->query("//link[@type='text/json+oembed']");
                                                foreach ($entries as $e) {
                                                        $href = $e->getAttributeNode('href')->nodeValue;
-                                                       $json_string = HTTPRequest::fetchUrl($href . '&maxwidth=' . $a->videowidth);
+                                                       $json_string = DI::httpRequest()->fetch($href . '&maxwidth=' . $a->videowidth);
                                                        break;
                                                }
                                        }