A feature-rich command-line audio/video downloader
[moviefap] Explicitly sort formats to handle possible site changes
George Brighton8a1b49ff19a8
diff --git a/youtube_dl/extractor/moviefap.py b/youtube_dl/extractor/moviefap.pyindex 20a78f3b2b..295bfe3f02 100644--- a/youtube_dl/extractor/moviefap.py+++ b/youtube_dl/extractor/moviefap.py@@ -111,11 +111,14 @@ class MovieFapIE(InfoExtractor):# multiple formats availableinfo['formats'] = []- # N.B. formats are already in ascending order of qualityfor item in xml.find('quality').findall('item'):+ resolution = xpath_text(item, 'res', 'resolution', True) # 480p etc.info['formats'].append({'url': xpath_text(item, 'videoLink', 'url', True),- 'resolution': xpath_text(item, 'res', 'resolution', True) # 480p etc.+ 'resolution': resolution,+ 'height': int(re.findall(r'\d+', resolution)[0])})+ self._sort_formats(info['formats'])+return info