YouTube¶
-
YouTube.
MediaObjectsForURL
(url)[source]¶ Build the Plex media objects for a given URL.
Parameters: - url : str
The url to build media objects for.
Returns: - Optional[list]
A list of Plex media objects.
Examples
>>> MediaObjectsForURL(url='https://www.youtube.com/watch?v=dQw4w9WgXcQ') [...]
-
YouTube.
MetadataObjectForURL
(url)[source]¶ Get YouTube metadata for a given URL.
Parameters: - url : str
The url to get metadata for.
Returns: - Optional[VideoClipObject]
The Plex video clip object.
Examples
>>> MetadataObjectForURL(url='https://www.youtube.com/watch?v=dQw4w9WgXcQ') ...
-
YouTube.
NormalizeURL
(url)[source]¶ Get the video webpage url from youtube-dl.
Parameters: - url : str
A string representation of url as provided by the Plex plugin.
Returns: - Optional[str]
The video webpage url. If no video webpage is found then
None
is returned.
Examples
>>> NormalizeURL(url='https://www.youtube.com/watch?v=dQw4w9WgXcQ') 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'