]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/OEmbed.php
doc/themes.md,FAQ-admin: point to live friendica-themes.com mirror
[friendica.git] / src / Content / OEmbed.php
index 313a2628dbf5ea7f1fd01298c6df716975ddb73b..0be220c517697d74e2134f558603e8907d2df396 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -26,12 +26,13 @@ use DOMNode;
 use DOMText;
 use DOMXPath;
 use Exception;
-use Friendica\Core\Cache\Duration;
+use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\Hook;
 use Friendica\Core\Renderer;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Network\HTTPClient\Client\HttpClient;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
 use Friendica\Util\ParseUrl;
@@ -97,7 +98,7 @@ class OEmbed
 
                        if (!in_array($ext, $noexts)) {
                                // try oembed autodiscovery
-                               $html_text = DI::httpClient()->fetch($embedurl, 15, 'text/*');
+                               $html_text = DI::httpClient()->fetch($embedurl, 15, HttpClient::ACCEPT_HTML);
                                if (!empty($html_text)) {
                                        $dom = new DOMDocument();
                                        if (@$dom->loadHTML($html_text)) {