telegram.InlineQueryResultVideo

class telegram.InlineQueryResultVideo(id, video_url, mime_type, thumb_url, title, caption=None, video_width=None, video_height=None, video_duration=None, description=None, reply_markup=None, input_message_content=None, parse_mode=None, caption_entities=None, *, api_kwargs=None)[source]

Bases: telegram.InlineQueryResult

Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.

Note

If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.

Parameters
type[source]

'video'.

Type

str

id[source]

Unique identifier for this result, 1- 64 Bytes.

Type

str

video_url[source]

A valid URL for the embedded video player or video file.

Type

str

mime_type[source]

Mime type of the content of video url, “text/html” or “video/mp4”.

Type

str

thumb_url[source]

URL of the thumbnail (JPEG only) for the video.

Type

str

title[source]

Title for the result.

Type

str

caption[source]

Caption of the video to be sent, 0-1024 characters after entities parsing.

Type

str, optional

parse_mode[source]

Mode for parsing entities. See telegram.constants.ParseMode and formatting options for more details.

Type

str, optional

caption_entities[source]

List of special entities that appear in the caption, which can be specified instead of parse_mode.

Type

List[telegram.MessageEntity], optional

video_width[source]

Video width.

Type

int, optional

video_height[source]

Video height.

Type

int, optional

video_duration[source]

Video duration in seconds.

Type

int, optional

description[source]

Short description of the result.

Type

str, optional

reply_markup[source]

Inline keyboard attached to the message.

Type

telegram.InlineKeyboardMarkup, optional

input_message_content[source]

Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).

Type

telegram.InputMessageContent, optional