diff options
author | Jesus E <heckyel@riseup.net> | 2023-06-18 19:45:34 -0400 |
---|---|---|
committer | Jesus E <heckyel@riseup.net> | 2023-06-18 19:45:34 -0400 |
commit | cd7624f2cb94ba3c8776b769f294b8a9ad8d7487 (patch) | |
tree | c77f6ff8825aa38f96124936c1f910eb6825da78 /youtube/util.py | |
parent | 5d5322587414dcc12572a6e854fbfe072b7e63b6 (diff) | |
download | yt-local-cd7624f2cb94ba3c8776b769f294b8a9ad8d7487.tar.lz yt-local-cd7624f2cb94ba3c8776b769f294b8a9ad8d7487.tar.xz yt-local-cd7624f2cb94ba3c8776b769f294b8a9ad8d7487.zip |
Set hqdefault thumnail images
Diffstat (limited to 'youtube/util.py')
-rw-r--r-- | youtube/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/util.py b/youtube/util.py index 6ee9fcd..5e4af55 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -462,7 +462,7 @@ class RateLimitedQueue(gevent.queue.Queue): def download_thumbnail(save_directory, video_id): - url = "https://i.ytimg.com/vi/" + video_id + "/mqdefault.jpg" + url = f"https://i.ytimg.com/vi/{video_id}/hqdefault.jpg" save_location = os.path.join(save_directory, video_id + ".jpg") try: thumbnail = fetch_url(url, report_text="Saved thumbnail: " + video_id) @@ -504,7 +504,7 @@ def video_id(url): # default, sddefault, mqdefault, hqdefault, hq720 def get_thumbnail_url(video_id): - return settings.img_prefix + "https://i.ytimg.com/vi/" + video_id + "/mqdefault.jpg" + return f"{settings.img_prefix}https://i.ytimg.com/vi/{video_id}/hqdefault.jpg" def seconds_to_timestamp(seconds): |