mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
Fixed extractor of Aparat with new updates
This commit is contained in:
parent
38200dc7f9
commit
995a2487cc
@ -43,19 +43,20 @@ class AparatIE(InfoExtractor):
|
|||||||
title = file_list['plugins']['sabaPlayerPlugin']['title']
|
title = file_list['plugins']['sabaPlayerPlugin']['title']
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for item in file_list['plugins']['sabaPlayerPlugin']['multiSRC'][1]:
|
for list in file_list['plugins']['sabaPlayerPlugin']['multiSRC']:
|
||||||
file_url = url_or_none(item.get('src'))
|
for item in list:
|
||||||
if not file_url:
|
file_url = url_or_none(item.get('src'))
|
||||||
continue
|
if not file_url:
|
||||||
ext = mimetype2ext(item.get('type'))
|
continue
|
||||||
label = item.get('label')
|
ext = mimetype2ext(item.get('type'))
|
||||||
formats.append({
|
label = item.get('label')
|
||||||
'url': file_url,
|
formats.append({
|
||||||
'ext': ext,
|
'url': file_url,
|
||||||
'format_id': label or ext,
|
'ext': ext,
|
||||||
'height': int_or_none(self._search_regex(
|
'format_id': label or ext,
|
||||||
r'(\d+)[pP]', label or '', 'height', default=None)),
|
'height': int_or_none(self._search_regex(
|
||||||
})
|
r'(\d+)[pP]', label or '', 'height', default=None)),
|
||||||
|
})
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
thumbnail = file_list['poster']
|
thumbnail = file_list['poster']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user