mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-25 19:01:18 +02:00
[Telegram] fix: remove all enclosures except for videos (#2850)
This commit is contained in:
@@ -189,7 +189,6 @@ EOD;
|
|||||||
return $stickerDiv;
|
return $stickerDiv;
|
||||||
|
|
||||||
} elseif (preg_match($this->backgroundImageRegex, $stickerDiv->find('i', 0)->style, $sticker)) {
|
} elseif (preg_match($this->backgroundImageRegex, $stickerDiv->find('i', 0)->style, $sticker)) {
|
||||||
$this->enclosures[] = $sticker[1];
|
|
||||||
|
|
||||||
return <<<EOD
|
return <<<EOD
|
||||||
<a href="{$stickerDiv->children(0)->herf}"><img src="{$sticker[1]}"></a>
|
<a href="{$stickerDiv->children(0)->herf}"><img src="{$sticker[1]}"></a>
|
||||||
@@ -237,7 +236,6 @@ EOD;
|
|||||||
preg_match($this->backgroundImageRegex, $preview->find('i', 0)->style, $photo)) {
|
preg_match($this->backgroundImageRegex, $preview->find('i', 0)->style, $photo)) {
|
||||||
|
|
||||||
$image = '<img src="' . $photo[1] . '"/>';
|
$image = '<img src="' . $photo[1] . '"/>';
|
||||||
$this->enclosures[] = $photo[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($preview->find('div.link_preview_title', 0)) {
|
if ($preview->find('div.link_preview_title', 0)) {
|
||||||
@@ -288,8 +286,6 @@ EOD;
|
|||||||
foreach ($messageDiv->find('a.tgme_widget_message_photo_wrap') as $photoWrap) {
|
foreach ($messageDiv->find('a.tgme_widget_message_photo_wrap') as $photoWrap) {
|
||||||
preg_match($this->backgroundImageRegex, $photoWrap->style, $photo);
|
preg_match($this->backgroundImageRegex, $photoWrap->style, $photo);
|
||||||
|
|
||||||
$this->enclosures[] = $photo[1];
|
|
||||||
|
|
||||||
$photos .= <<<EOD
|
$photos .= <<<EOD
|
||||||
<a href="{$photoWrap->href}"><img src="{$photo[1]}"/></a><br>
|
<a href="{$photoWrap->href}"><img src="{$photo[1]}"/></a><br>
|
||||||
EOD;
|
EOD;
|
||||||
@@ -308,8 +304,6 @@ EOD;
|
|||||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo);
|
preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->enclosures[] = $photo[1];
|
|
||||||
|
|
||||||
return <<<EOD
|
return <<<EOD
|
||||||
<a href="{$messageDiv->find('a.not_supported', 0)->href}">
|
<a href="{$messageDiv->find('a.not_supported', 0)->href}">
|
||||||
{$messageDiv->find('div.message_media_not_supported_label', 0)->innertext}<br><br>
|
{$messageDiv->find('div.message_media_not_supported_label', 0)->innertext}<br><br>
|
||||||
@@ -344,8 +338,6 @@ EOD;
|
|||||||
|
|
||||||
$link = $messageDiv->find('a.tgme_widget_message_location_wrap', 0)->href;
|
$link = $messageDiv->find('a.tgme_widget_message_location_wrap', 0)->href;
|
||||||
|
|
||||||
$this->enclosures[] = $image[1];
|
|
||||||
|
|
||||||
return <<<EOD
|
return <<<EOD
|
||||||
<a href="{$link}"><img src="{$image[1]}"></a>
|
<a href="{$link}"><img src="{$image[1]}"></a>
|
||||||
EOD;
|
EOD;
|
||||||
|
Reference in New Issue
Block a user