mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-29 03:47:42 +01:00
[Telegram] fix: remove all enclosures except for videos (#2850)
This commit is contained in:
parent
9d5f59e2db
commit
bde00447f1
@ -189,7 +189,6 @@ EOD;
|
||||
return $stickerDiv;
|
||||
|
||||
} elseif (preg_match($this->backgroundImageRegex, $stickerDiv->find('i', 0)->style, $sticker)) {
|
||||
$this->enclosures[] = $sticker[1];
|
||||
|
||||
return <<<EOD
|
||||
<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)) {
|
||||
|
||||
$image = '<img src="' . $photo[1] . '"/>';
|
||||
$this->enclosures[] = $photo[1];
|
||||
}
|
||||
|
||||
if ($preview->find('div.link_preview_title', 0)) {
|
||||
@ -288,8 +286,6 @@ EOD;
|
||||
foreach ($messageDiv->find('a.tgme_widget_message_photo_wrap') as $photoWrap) {
|
||||
preg_match($this->backgroundImageRegex, $photoWrap->style, $photo);
|
||||
|
||||
$this->enclosures[] = $photo[1];
|
||||
|
||||
$photos .= <<<EOD
|
||||
<a href="{$photoWrap->href}"><img src="{$photo[1]}"/></a><br>
|
||||
EOD;
|
||||
@ -308,8 +304,6 @@ EOD;
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo);
|
||||
}
|
||||
|
||||
$this->enclosures[] = $photo[1];
|
||||
|
||||
return <<<EOD
|
||||
<a href="{$messageDiv->find('a.not_supported', 0)->href}">
|
||||
{$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;
|
||||
|
||||
$this->enclosures[] = $image[1];
|
||||
|
||||
return <<<EOD
|
||||
<a href="{$link}"><img src="{$image[1]}"></a>
|
||||
EOD;
|
||||
|
Loading…
x
Reference in New Issue
Block a user