Module pyreddit.models.media

Module for Media class.

Classes

class Media (url: str, media_type: ContentType, size: Union[int, NoneType] = None)

Represents a media content in the application.

This can be any of ContentType: photo, video, gif, etc.

Parameters

url : str
URL of the media on the internet.
media_type : ContentType
Content type of the media. This is used in pyreddit.linker.Linker to determine what type of message to send to the chat.
size : int
Size (in bytes) of the media content. This can be none if it is unkwnown, but it is crucial because of file size limitations.