Repository: youtube-dl
Issue: Generic format names for Odnoklassniki don't work
Labels: cant-reproduce


- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2020.05.29**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

youtube-dl https://ok.ru/video/311973053873 -f mobile -v

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://ok.ru/video/311973053873', u'-f', u'mobile', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.05.29
[debug] Python version 2.7.17 (CPython) - Linux-4.15.0-101-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[Odnoklassniki] 311973053873: Downloading webpage
[Odnoklassniki] 311973053873: Downloading m3u8 information
[debug] Invoking downloader on u'https://vd79.mycdn.me/?expires=1590921576014&srcIp=41.188.101.22&srcAg=CHROME&ms=185.16.245.75&type=4&sig=kUP9wv8VS0A&ct=0&urls=5.61.21.100&clientType=0&id=319081876145'
ERROR: unable to download video data: HTTP Error 400: Bad Request
Traceback (most recent call last):
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/YoutubeDL.py", line 1926, in process_info
    success = dl(filename, info_dict)
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/YoutubeDL.py", line 1865, in dl
    return fd.download(name, info)
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/home/miikku/bin/youtube-dl-new/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request


## Description

For each video, Odnoklassniki lists several formats when you pass the -F argument, as follows:

[Odnoklassniki] 311973053873: Downloading webpage
[Odnoklassniki] 311973053873: Downloading m3u8 information
[info] Available formats for 311973053873:
format code  extension  resolution note
mobile       mp4        unknown    
mpd-1        mp4        256x144    DASH video  118k , mp4_dash container, avc1.42C01E, 25fps, mp4a.40.2 (857761146Hz)
hls-153      mp4        256x144     153k 
lowest       mp4        unknown    
mpd-2        mp4        426x238    DASH video  307k , mp4_dash container, avc1.42C01E, 25fps, mp4a.40.2 (857761146Hz)
hls-358      mp4        426x238     358k 
low          mp4        unknown    
mpd-3        mp4        640x360    DASH video  652k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (857761146Hz)
hls-731      mp4        640x360     731k 
sd           mp4        unknown    
mpd-4        mp4        852x478    DASH video  729k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (857761146Hz)
hls-817      mp4        852x478     817k  (best)

The numbering of the hls-* formats is different for each video, whereas the names of the mpd-* formats stay constant with up to 5 different levels. In addition, there are generic names "mobile, lowest, low, sd, hd" which are presumably supposed to be synonymous for one of the others. Downloading a video with a specified hls-* or mpd-* format works fine but the generic names produce a "HTTP 400 Bad request". This happens with all the videos I have tested recently, though I think earlier they used to work.