Extract thumbnail from a YouTube video (updated)

Many youtube channels incorporate their own thumbnail onto the video. Many does it only for the purpose of clickbait, while most does it to represent the content of that video. No matter the reason, it’s sometimes useful to download that thumbnail. Let’s use a physics video by ilectureonline.com to see how we can get that static thumbnail.

Normal url on youtube is standard like this:
youtube.com/watch?=’GENERATED-VIDEOLINK’

(NOTE: Never mind the prefix https://www. as the browser will handle that automatically.)

So f.ex, for the video “mechanical waves 1 of 21” the url to that video is:
youtube.com/watch?v=3NY2aSIMVOo

At least for now (until google changes it) the thumbnail url for that video is:
img.youtube.com/vi/3NY2aSIMVOo/0.jpg

Alternatively, use this link to get the full resolution:
i.ytimg.com/vi/3NY2aSIMVOo/maxresdefault.jpg

Just substitute the random linkname generated by youtube and put it after /vi/.