mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
Merge pull request #13960 from annando/oembed-full-cleanup
Oembed: Some more cleanup
This commit is contained in:
commit
f4826bae52
3 changed files with 2 additions and 5 deletions
|
@ -225,7 +225,7 @@ class OEmbed
|
||||||
'$turl' => BBCode::proxyUrl($oembed->thumbnail_url, BBCode::INTERNAL, $uriid, Proxy::SIZE_SMALL),
|
'$turl' => BBCode::proxyUrl($oembed->thumbnail_url, BBCode::INTERNAL, $uriid, Proxy::SIZE_SMALL),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$ret = $oembed->html;
|
$ret .= Proxy::proxifyHtml($oembed->html, $uriid);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ class Media
|
||||||
*/
|
*/
|
||||||
private static function addPage(array $media): array
|
private static function addPage(array $media): array
|
||||||
{
|
{
|
||||||
$data = ParseUrl::getSiteinfoCached($media['url'], false);
|
$data = ParseUrl::getSiteinfoCached($media['url']);
|
||||||
$media['preview'] = $data['images'][0]['src'] ?? null;
|
$media['preview'] = $data['images'][0]['src'] ?? null;
|
||||||
$media['preview-height'] = $data['images'][0]['height'] ?? null;
|
$media['preview-height'] = $data['images'][0]['height'] ?? null;
|
||||||
$media['preview-width'] = $data['images'][0]['width'] ?? null;
|
$media['preview-width'] = $data['images'][0]['width'] ?? null;
|
||||||
|
|
|
@ -23,7 +23,6 @@ namespace Friendica\Util;
|
||||||
|
|
||||||
use DOMDocument;
|
use DOMDocument;
|
||||||
use DOMXPath;
|
use DOMXPath;
|
||||||
use Friendica\Content\OEmbed;
|
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Protocol\HTTP\MediaType;
|
use Friendica\Protocol\HTTP\MediaType;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
|
@ -165,8 +164,6 @@ class ParseUrl
|
||||||
* \<meta name="description" content="An awesome description"\>
|
* \<meta name="description" content="An awesome description"\>
|
||||||
*
|
*
|
||||||
* @param string $url The url of the page which should be scraped
|
* @param string $url The url of the page which should be scraped
|
||||||
* @param bool $do_oembed The false option is used by the function fetch_oembed()
|
|
||||||
* to avoid endless loops
|
|
||||||
* @param int $count Internal counter to avoid endless loops
|
* @param int $count Internal counter to avoid endless loops
|
||||||
*
|
*
|
||||||
* @return array which contains needed data for embedding
|
* @return array which contains needed data for embedding
|
||||||
|
|
Loading…
Reference in a new issue