Repository: youtube-dl
Issue: [For Youtube] Bring back .JPG thumbnails for --write-thumbnail, add option for user to select which format of thumbnail to download
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.07. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.04.07**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

Some months back, Youtube switched to webp format thumbnails. Youtube-DL followed suit and started downloading ONLY webp formats. This never sat well with me. I am so used to .JPG. It's compatible with so many image-viewer programs which I'm more comfortable using. Even modern digital cameras still write to JPG. I therefore wrote my own script to download the JPG format thumbnails for all videos which Youtube-DL had downloaded. I have been using it all these months, whilst hoping that Youtube-DL would someday switch back to JPG. But it looks like webp is here to stay. 

I am therefore putting in a request that you guys provide users the option to:
1. pick which thumbnail format to download, for example --write-thumbnail [format code] eg --write-thumbnail 4
2. Add the .JPG format thumbnail to the list of options, and the HIGHEST RESOLUTION JPG at that, though the lower-resolution JPG can be added too if the code change can accommodate it. 

Right now, one can use --list-thumbnails to list all the thumbnail formats which are available, but no option to pick any one single format to download. This being the case, I'm not even sure what the point is of --list-thumbnails. You can see what options are available, but you can't select any one of them. And I doubt that many people would have any use for --write-all-thumbnails. Moreover, with --list-thumbnails, only the webp formats are listed, even though a JPG thumbnails IS available for download. 

Example usage of --list-thumbnails, showing that JPG formats which are available for download are omitted from the results:
```
$ youtube-dl --list-thumbnails "HOYDj769s6k"
[youtube] HOYDj769s6k: Downloading webpage
[info] Thumbnails for HOYDj769s6k:
ID  width  height URL
0   168    94     https://i.ytimg.com/vi/HOYDj769s6k/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLAlo8pT1iYu8kDBBWBEiItdBBjowQ
1   196    110    https://i.ytimg.com/vi/HOYDj769s6k/hqdefault.jpg?sqp=-oaymwEbCMQBEG5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLACFB4J9WHELxbdPNIrpP_ff5roZw
2   246    138    https://i.ytimg.com/vi/HOYDj769s6k/hqdefault.jpg?sqp=-oaymwEcCPYBEIoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAVLxhs7hjapkWdvJNq-CoglmL0xg
3   336    188    https://i.ytimg.com/vi/HOYDj769s6k/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCD_AJAhppPPqHUT3nTrANr9NtGNQ
4   1920   1080   https://i.ytimg.com/vi_webp/HOYDj769s6k/maxresdefault.webp
```

The .JPG format URL is ALWAYS in one of two formats (sometimes both) in the HTML source code of every Youtube video webpage:
```
https://i.ytimg.com/vi/HOYDj769s6k/maxresdefault.jpg
https://i.ytimg.com/vi/HOYDj769s6k/hqdefault.jpg
```

This URL is found in the the HTML source code in a meta tag:
```
<meta property="og:image" content="https://i.ytimg.com/vi/HOYDj769s6k/maxresdefault.jpg">
```

User @aviv926 asked a [question](https://github.com/ytdl-org/youtube-dl/issues/28457) a few months ago about how to download the .JPG format thumbnail. One reply was to use curl as the user agent to obtain the url for the JPG and then download the JPG thumbnail:
```
$ youtube-dl HOYDj769s6k --get-thumbnail --user-agent curl/7.54.0
https://i.ytimg.com/vi/HOYDj769s6k/maxresdefault.jpg

$ youtube-dl HOYDj769s6k --write-thumbnail --user-agent curl/7.54.0
[youtube] HOYDj769s6k: Downloading webpage
[youtube] HOYDj769s6k: Downloading thumbnail ...
[youtube] HOYDj769s6k: Writing thumbnail to: Titan Missile Explosion HD-HOYDj769s6k.jpg
```

But I don't like this because it means generating an extra webpage request just to download the thumbnail. If you're downloading an entire channel with say 3000 videos, and then you DOUBLE the number of requests generated by Youtube-DL, you'll get a "429: Too Many Requests" error for sure, and a subsequent IP ban for a few days. I would rather have Youtube-DL generate one webpage request, then extract all info, including the thumbnail URL, from that. 

So to reiterate, I request that a feature be added which gives the user options on which thumbnail to download, and adds the .JPG thumbnail (at least the highest resolution version) as an option.