Constructor
class Thumbnail(url)
Represents a thumbnail image from a YouTube video, allowing the image to be downloaded, cropped, and saved in different qualities.
Parameters:
url |
str |
The URL of the thumbnail image. |
Properties
The URL of the thumbnail image.
Methods
download(folder, quality) ->
str
Downloads and saves the thumbnail to the specified folder.
Returns:
|
str |
The path to the downloaded file. |
Parameters:
folder |
str |
Directory where the downloaded file will be saved. |
quality |
str |
"max" or "min". Default is "medium". |
Example
import MyTube
yt = MyTube.YouTube("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
file = yt.thumbnail.download("downloads", quality="max")
print(file)
>>> C:\Python\MyTube\downloads\dzswwcrr.jpg