Browse Source

[pladform] Fix format quality sorting

totalwebcasting
Sergey M․ 10 years ago
parent
commit
11101076a1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      youtube_dl/extractor/pladform.py

+ 4
- 0
youtube_dl/extractor/pladform.py View File

@ -6,6 +6,7 @@ from ..utils import (
ExtractorError,
int_or_none,
xpath_text,
qualities,
)
@ -55,9 +56,12 @@ class PladformIE(InfoExtractor):
'%s returned error: %s' % (self.IE_NAME, video.text),
expected=True)
quality = qualities(('ld', 'sd', 'hd'))
formats = [{
'url': src.text,
'format_id': src.get('quality'),
'quality': quality(src.get('quality')),
} for src in video.findall('./src')]
self._sort_formats(formats)


Loading…
Cancel
Save