get_web_page_preview()

async Client.get_web_page_preview()

Get a web page preview from a message containing a URL.

Usable by Users Bots
Parameters:
  • message (str) – The message text that contains the URL to preview.

  • entities (List of MessageEntity, optional) – Text entities for the message.

Returns:

MessageMedia – The web page preview media.

Example

preview = await app.get_web_page_preview("Check https://example.com")