[Fifa] Sort formats

Closes #3632
This commit is contained in:
pukkandan 2022-05-04 19:07:34 +05:30
parent 468f104ce7
commit 86925f6334
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -8,7 +8,7 @@
class FifaIE(InfoExtractor):
_VALID_URL = r'https?://www.fifa.com/fifaplus/(?P<locale>\w{2})/watch/(?P<id>\w+)/?'
_VALID_URL = r'https?://www.fifa.com/fifaplus/(?P<locale>\w{2})/watch/([^#?]+/)?(?P<id>\w+)'
_TESTS = [{
'url': 'https://www.fifa.com/fifaplus/en/watch/7on10qPcnyLajDDU3ntg6y',
'info_dict': {
@ -93,8 +93,8 @@ def _real_extract(self, url):
'sig': preplay_parameters['signature'],
})
formats = self._extract_m3u8_formats(
content_data['playURL'], video_id, note='Downloading m3u8 Information')
formats, subtitles = self._extract_m3u8_formats_and_subtitles(content_data['playURL'], video_id)
self._sort_formats(formats)
return {
'id': video_id,
@ -105,4 +105,5 @@ def _real_extract(self, url):
'categories': traverse_obj(video_details, (('videoCategory', 'videoSubcategory'),)),
'thumbnail': traverse_obj(video_details, ('backgroundImage', 'src')),
'formats': formats,
'subtitles': subtitles,
}