MessageMediaWebPage

class pyrogram.raw.types.MessageMediaWebPage

Preview of webpage

Constructor of MessageMedia.

Details:
  • Layer: 227

  • ID: DDF10C3B

Parameters:
  • webpage (WebPage) – Webpage preview

  • force_large_media (bool, optional) – If set, specifies that a large media preview should be used.

  • force_small_media (bool, optional) – If set, specifies that a small media preview should be used.

  • manual (bool, optional) – If set, indicates that the URL used for the webpage preview was specified manually using inputMediaWebPage, and may not be related to any of the URLs specified in the message.

  • safe (bool, optional) – If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened.

Functions:

This object can be returned by 2 functions.

messages.UploadMedia

Upload a file and associate it to a chat (without actually sending it to the chat)

messages.UploadImportedMedia

Upload a media file associated with an imported chat, click here for more info ».

TL Schema

messageMediaWebPage#ddf10c3b
flags:#
force_large_media:flags.0?true
force_small_media:flags.1?true
manual:flags.3?true
safe:flags.4?true
webpage:WebPage

= MessageMedia

Parameter Tree

MessageMediaWebPage
├── force_large_media → true (optional)
├── force_small_media → true (optional)
├── manual → true (optional)
├── safe → true (optional)
└── webpage → WebPage
├── WebPageEmpty
│ ├── id → long
│ └── url → string (optional)
├── WebPagePending
│ ├── id → long
│ ├── url → string (optional)
│ └── date → int
├── WebPage
│ ├── has_large_media → true (optional)
│ ├── video_cover_photo → true (optional)
│ ├── id → long
│ ├── url → string
│ ├── display_url → string
│ ├── hash → int
│ ├── type → string (optional)
│ ├── site_name → string (optional)
│ ├── title → string (optional)
│ ├── description → string (optional)
│ ├── photo → Photo (optional)
│ │ ├── PhotoEmpty
│ │ │ └── id → long
│ │ └── Photo
│ │ ├── has_stickers → true (optional)
│ │ ├── id → long
│ │ ├── access_hash → long
│ │ ├── file_reference → bytes
│ │ ├── date → int
│ │ ├── sizes → Vector < PhotoSize >
│ │ │ ├── PhotoSizeEmpty
│ │ │ ├── PhotoSize
│ │ │ ├── PhotoCachedSize
│ │ │ ├── PhotoStrippedSize
│ │ │ ├── PhotoSizeProgressive
│ │ │ └── PhotoPathSize
│ │ ├── video_sizes → Vector < VideoSize > (optional)
│ │ │ ├── VideoSize
│ │ │ ├── VideoSizeEmojiMarkup
│ │ │ └── VideoSizeStickerMarkup
│ │ └── dc_id → int
│ ├── embed_url → string (optional)
│ ├── embed_type → string (optional)
│ ├── embed_width → int (optional)
│ ├── embed_height → int (optional)
│ ├── duration → int (optional)
│ ├── author → string (optional)
│ ├── document → Document (optional)
│ │ ├── DocumentEmpty
│ │ │ └── id → long
│ │ └── Document
│ │ ├── id → long
│ │ ├── access_hash → long
│ │ ├── file_reference → bytes
│ │ ├── date → int
│ │ ├── mime_type → string
│ │ ├── size → long
│ │ ├── thumbs → Vector < PhotoSize > (optional)
│ │ │ ├── PhotoSizeEmpty
│ │ │ ├── PhotoSize
│ │ │ ├── PhotoCachedSize
│ │ │ ├── PhotoStrippedSize
│ │ │ ├── PhotoSizeProgressive
│ │ │ └── PhotoPathSize
│ │ ├── video_thumbs → Vector < VideoSize > (optional)
│ │ │ ├── VideoSize
│ │ │ ├── VideoSizeEmojiMarkup
│ │ │ └── VideoSizeStickerMarkup
│ │ ├── dc_id → int
│ │ └── attributes → Vector < DocumentAttribute >
│ │ ├── DocumentAttributeImageSize
│ │ ├── DocumentAttributeAnimated
│ │ ├── DocumentAttributeSticker
│ │ ├── DocumentAttributeVideo
│ │ ├── DocumentAttributeAudio
│ │ ├── DocumentAttributeFilename
│ ├── cached_page → Page (optional)
│ │ └── Page
│ │ ├── part → true (optional)
│ │ ├── rtl → true (optional)
│ │ ├── v2 → true (optional)
│ │ ├── url → string
│ │ ├── blocks → Vector < PageBlock >
│ │ │ ├── PageBlockUnsupported
│ │ │ ├── PageBlockTitle
│ │ │ ├── PageBlockSubtitle
│ │ │ ├── PageBlockAuthorDate
│ │ │ ├── PageBlockHeader
│ │ │ ├── PageBlockSubheader
│ │ │ ├── PageBlockParagraph
│ │ │ ├── PageBlockPreformatted
│ │ │ ├── PageBlockFooter
│ │ │ ├── PageBlockDivider
│ │ │ ├── PageBlockAnchor
│ │ │ ├── PageBlockList
│ │ │ ├── PageBlockBlockquote
│ │ │ ├── PageBlockPullquote
│ │ │ ├── PageBlockPhoto
│ │ │ ├── PageBlockVideo
│ │ │ ├── PageBlockCover
│ │ │ ├── PageBlockEmbed
│ │ │ ├── PageBlockEmbedPost
│ │ │ ├── PageBlockCollage
│ │ │ ├── PageBlockSlideshow
│ │ │ ├── PageBlockChannel
│ │ │ ├── PageBlockAudio
│ │ │ ├── PageBlockKicker
│ │ │ ├── PageBlockTable
│ │ │ ├── PageBlockOrderedList
│ │ │ ├── PageBlockDetails
│ │ │ ├── PageBlockRelatedArticles
│ │ │ ├── PageBlockMap
│ │ │ ├── PageBlockHeading1
│ │ │ ├── PageBlockHeading2
│ │ │ ├── PageBlockHeading3
│ │ │ ├── PageBlockHeading4
│ │ │ ├── PageBlockHeading5
│ │ │ ├── PageBlockHeading6
│ │ │ ├── PageBlockMath
│ │ │ ├── PageBlockThinking
│ │ │ ├── InputPageBlockMap
│ │ │ └── PageBlockBlockquoteBlocks
│ │ ├── photos → Vector < Photo >
│ │ │ ├── PhotoEmpty
│ │ │ └── Photo
│ │ ├── documents → Vector < Document >
│ │ │ ├── DocumentEmpty
│ │ │ └── Document
│ │ └── views → int (optional)
│ └── attributes → Vector < WebPageAttribute > (optional)
│ ├── WebPageAttributeTheme
│ │ ├── documents → Vector < Document > (optional)
│ │ │ ├── DocumentEmpty
│ │ │ └── Document
│ │ └── settings → ThemeSettings (optional)
│ │ └── ThemeSettings
│ ├── WebPageAttributeStory
│ │ ├── peer → Peer
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── id → int
│ │ └── story → StoryItem (optional)
│ │ ├── StoryItemDeleted
│ │ ├── StoryItemSkipped
│ │ └── StoryItem
│ │ ├── emojis → true (optional)
│ │ ├── text_color → true (optional)
│ │ └── stickers → Vector < Document >
│ │ ├── DocumentEmpty
│ │ └── Document
│ │ └── gift → StarGift
│ │ ├── StarGift
│ │ └── StarGiftUnique
│ │ └── icons → Vector < Document >
│ │ ├── DocumentEmpty
│ │ └── Document
│ │ ├── gift → StarGift
│ │ │ ├── StarGift
│ │ │ └── StarGiftUnique
│ │ └── end_date → int
│ └── emoji_id → long
└── cached_page_views → int (optional)

Example

MessageMediaWebPage(
    webpage=WebPageEmpty(id=0),
)