WebPage

class pyrogram.types.WebPage

A webpage preview

Parameters:
  • id (str) – Unique identifier for this webpage.

  • url (str) – Full URL for this webpage.

  • display_url (str, optional) – Display URL for this webpage.

  • type (str, optional) – Type of webpage preview. One of the following:

    • video

    • gif

    • photo

    • document

    • profile

    • telegram_background

    • telegram_theme

    • telegram_story

    • telegram_channel

    • telegram_channel_request

    • telegram_megagroup

    • telegram_chat

    • telegram_megagroup_request

    • telegram_chat_request

    • telegram_album

    • telegram_message

    • telegram_bot

    • telegram_voicechat

    • telegram_livestream

    • telegram_user

    • telegram_botapp

    • telegram_channel_boost

    • telegram_group_boost

    • telegram_giftcode

    • telegram_stickerset

  • site_name (str, optional) – Webpage site name.

  • title (str, optional) – Title of this webpage.

  • description (str, optional) – Description of this webpage.

  • audio (Audio, optional) – Webpage preview is an audio file, information about the file.

  • document (Document, optional) – Webpage preview is a general file, information about the file.

  • photo (Photo, optional) – Webpage preview is a photo, information about the photo.

  • animation (Animation, optional) – Webpage preview is an animation, information about the animation.

  • video (Video, optional) – Webpage preview is a video, information about the video.

  • embed_url (str, optional) – Embedded content URL.

  • embed_type (str, optional) – Embedded content type, like iframe

  • embed_width (int, optional) – Embedded content width.

  • embed_height (int, optional) – Embedded content height.

  • has_large_media (bool, optional) – Whether the webpage preview is large.

  • prefer_large_media (bool, optional) – Whether the webpage preview is large.

  • prefer_small_media (bool, optional) – Whether the webpage preview is small.

  • manual (bool, optional) – Whether the webpage preview was changed by the user.

  • safe (bool, optional) – Whether the webpage preview is safe.

  • duration (int, optional) – Unknown at the time of writing.

  • author (str, optional) – Author of the webpage, eg the Twitter user for a tweet, or the author in an article.

  • raw (MessageMediaWebPage) – The raw version of this object.