|
|
@ -6,8 +6,8 @@ from .common import InfoExtractor, SearchInfoExtractor
|
|
|
|
from ..utils import (
|
|
|
|
from ..utils import (
|
|
|
|
compat_urllib_parse,
|
|
|
|
compat_urllib_parse,
|
|
|
|
compat_urlparse,
|
|
|
|
compat_urlparse,
|
|
|
|
determine_ext,
|
|
|
|
|
|
|
|
clean_html,
|
|
|
|
clean_html,
|
|
|
|
|
|
|
|
int_or_none,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -68,9 +68,9 @@ class YahooIE(InfoExtractor):
|
|
|
|
formats = []
|
|
|
|
formats = []
|
|
|
|
for s in info['streams']:
|
|
|
|
for s in info['streams']:
|
|
|
|
format_info = {
|
|
|
|
format_info = {
|
|
|
|
'width': s.get('width'),
|
|
|
|
'width': int_or_none(s.get('width')),
|
|
|
|
'height': s.get('height'),
|
|
|
|
'height': int_or_none(s.get('height')),
|
|
|
|
'bitrate': s.get('bitrate'),
|
|
|
|
'tbr': int_or_none(s.get('bitrate')),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
host = s['host']
|
|
|
|
host = s['host']
|
|
|
@ -84,10 +84,10 @@ class YahooIE(InfoExtractor):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
format_url = compat_urlparse.urljoin(host, path)
|
|
|
|
format_url = compat_urlparse.urljoin(host, path)
|
|
|
|
format_info['url'] = format_url
|
|
|
|
format_info['url'] = format_url
|
|
|
|
format_info['ext'] = determine_ext(format_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formats.append(format_info)
|
|
|
|
formats.append(format_info)
|
|
|
|
formats = sorted(formats, key=lambda f:(f['height'], f['width']))
|
|
|
|
|
|
|
|
|
|
|
|
self._sort_formats(formats)
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
'id': video_id,
|
|
|
|
'id': video_id,
|
|
|
|